My page has a wizard control and each step is a user control. I could find the value of a control in step1 user control in the wizard page but not in step2 user control.
From wizard.aspx.vb β it worksDim m_title As DropDownList = CType(Me.PersonalBox1.FindControl("ddlTitle1"), DropDownList)Question:How can I find the value of a control(textbox or dropdownlist)in step1 user control from step2 user control?
I want to find βPersonalBox1.FindControl("ddlTitle1")β from Step2 AddressBox1. I have tried several ways to access it but no luck.
From AddressBox.ascx.vb β it didnβt work.Dim m_title As DropDownList = CType(Me.Parent.Page.FindControl("wzd1$PersonalBox1$ddlTitle1"), DropDownList)
<wizard.aspx.vb><asp:Content ID="maincontent" ContentPlaceHolderID="maincontent" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" AllowCustomErrorsRedirect="false" EnablePartialRendering="true" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="contentleft">
<asp:Wizard ID="wzd1" runat="server" SkinID="wzd1" ActiveStepIndex="0" >
<WizardSteps>
<asp:WizardStep runat="server" title="Personal" ID="wspPersonal">
<uc:PersonalBox ID="PersonalBox1" runat="server" />
</asp:WizardStep>
<asp:WizardStep runat="server" title="Address" ID="wspAddress">
<uc:AddressBox ID="AddressBox1" runat="server" />
</asp:WizardStep>
<asp:WizardStep ID="wspConfirmation" runat="server" Title="Confirmation" StepType="Finish" >
</asp:WizardStep>
</WizardSteps>
<FinishNavigationTemplate>Removed all buttons from the Finish Navigation Template</FinishNavigationTemplate> </asp:Wizard>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
Thanks
Amy
![]() |
0 |
![]() |
Can anyone shed some light on this? Thanks
![]() |
0 |
![]() |
Hi amy88,
Try this:
Dim pb As PersonalBox = DirectCast(wzd1.WizardSteps(0).FindControl("PersonalBox1"), PersonalBox)
Dim m_title As DropDownList = DirectCast(pb.FindControl("ddlTitle1"), DropDownList)Thanks,
Qin Dian Tang
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
![]() |
0 |
![]() |