I have converted a standard ASP.net Web Form written in VB into a multi-step Wizard control. There is a section/step in the form that contains 4 drop-downs. All 4 drop-downs contain the same list items and values:
<aspropDownList ID="ddl1st" runat="server">
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
</aspropDownList>
When a selection is made from drop-down #1 (ddl1st), I would like the remaining 3 drop-downs (ddl2nd, ddl3rd, ddl4th) to automatically select the same selected item as the ddl1st.
So, for example, if the user selects '50,000/100,000' from 'ddl1st', I would like ddl2nd, ddl3rd, and ddl4th to also select '50,000/100,000'.
I was using the JQuery Date Picker for date fields and a JS solution for the drop-downs but all that stopped working when I converted the standard form into a Wizard control. I am now using the Ajax toolkit Calendar extender for date fields and would like to come up with an ASP.Net solution for the Drop-down issue described above.
I need something that works within the following structure:
<form runat="server" name="quoteform">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Wizard ID="Wizard1" />
<asp:WizardStep ID="WizardStep1" runat="server" StepType="Step">
<table >
<tr>
<td><strong>Bodily Injury:</strong></td>
<td><aspropDownList ID="ddlVeh1BodInjury" runat="server">
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
<td><aspropDownList ID="ddlVeh2BodInjury" runat="server" >
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
<td><aspropDownList ID="ddlVeh3BodInjury" runat="server" >
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
<td><aspropDownList ID="ddlVeh4BodInjury" runat="server" >
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
</tr>
</asp:WizardStep>
</asp:Wizard>
</ContentTemplate>
</asp:UpdatePanel>
</form>
Coded examples please, thanks in advance!
<aspropDownList ID="ddl1st" runat="server">
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
</aspropDownList>
When a selection is made from drop-down #1 (ddl1st), I would like the remaining 3 drop-downs (ddl2nd, ddl3rd, ddl4th) to automatically select the same selected item as the ddl1st.
So, for example, if the user selects '50,000/100,000' from 'ddl1st', I would like ddl2nd, ddl3rd, and ddl4th to also select '50,000/100,000'.
I was using the JQuery Date Picker for date fields and a JS solution for the drop-downs but all that stopped working when I converted the standard form into a Wizard control. I am now using the Ajax toolkit Calendar extender for date fields and would like to come up with an ASP.Net solution for the Drop-down issue described above.
I need something that works within the following structure:
<form runat="server" name="quoteform">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Wizard ID="Wizard1" />
<asp:WizardStep ID="WizardStep1" runat="server" StepType="Step">
<table >
<tr>
<td><strong>Bodily Injury:</strong></td>
<td><aspropDownList ID="ddlVeh1BodInjury" runat="server">
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
<td><aspropDownList ID="ddlVeh2BodInjury" runat="server" >
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
<td><aspropDownList ID="ddlVeh3BodInjury" runat="server" >
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
<td><aspropDownList ID="ddlVeh4BodInjury" runat="server" >
<asp:ListItem value="">-- Select One --</asp:ListItem>
<asp:ListItem value="15,000/30,000">15,000/30,000</asp:ListItem>
<asp:ListItem value="25,000/50,000">25,000/50,000</asp:ListItem>
<asp:ListItem value="50,000/100,000">50,000/100,000</asp:ListItem>
<asp:ListItem value="100,000/300,000">100,000/300,000</asp:ListItem>
<asp:ListItem value="250,000/500,000">250,000/500,000</asp:ListItem>
<asp:ListItem value="500,000/500,000">500,000/500,000</asp:ListItem>
</aspropDownList></td>
</tr>
</asp:WizardStep>
</asp:Wizard>
</ContentTemplate>
</asp:UpdatePanel>
</form>
Coded examples please, thanks in advance!