This is a discussion on Web User Control - DOTNET ; I'm trying to extract one simple value from Main.ascx. ************************************************************************** Page1.aspx <asp:Wizard ID="Wizard1" Width="475px" runat="server" ActiveStepIndex="0" Height="425px" OnFinishButtonClick="Wizard1_FinishButtonClick1" > <WizardSteps> <asp:WizardStep ID="WizardStep1" runat="server" Title="Main"> <Acme:Main runat="server" id="MainWC" /> </asp:WizardStep> </WizardSteps> </asp:Wizard> ************************************************************************** code behind ************************************************************************** Page1.cs on to the "Wizard1_FinishButtonClick1" ...
I'm trying to extract one simple value from Main.ascx.
**************************************************************************
Page1.aspx
<asp:Wizard ID="Wizard1" Width="475px" runat="server"
ActiveStepIndex="0" Height="425px"
OnFinishButtonClick="Wizard1_FinishButtonClick1" >
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server"
Title="Main">
<Acme:Main runat="server" id="MainWC" />
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
**************************************************************************
code behind
**************************************************************************
Page1.cs
on to the "Wizard1_FinishButtonClick1" event
protected void Wizard1_FinishButtonClick1(object sender,
WizardNavigationEventArgs e)
{
lblId.Text = Page.FindControl("CorrectionType").ToString();
}
**************************************************************************
**************************************************************************
Main.ascx
<aspropDownList ID="CorrectionType" runat="server">
<asp:ListItem Value="None" Selected=True>None</asp:ListItem>
<asp:ListItem Value="A">A</asp:ListItem>
<asp:ListItem Value="B">B</asp:ListItem>
<asp:ListItem Value="C">B</asp:ListItem>
</aspropDownList>
**************************************************************************
Thanks,