From: xbound on
I have two dropdowns: I've added a first item like "Please Select" to each
and each has it own RequiredFieldValidator control which fires if the user
does not select something. The code for the second one looks like this

<asp:DropDownList ID="ddl2" runat="server" AutoPostBack="true"
AppendDataBoundItems="true" ......
<asp:ListItem Text="Please select" Value="0" />
<asp:RequiredFieldValidator ID="reqddl2" runat="server"
Display="Dynamic" ErrorMessage="Name is required"

The second dropdown is populated depending on what's selected in the first
one. In the SelectedIndexChanged event of the first dropdown I've added
this statement [ ddl2.Items.Insert(0, "Please Select") ] because otherwise
that first item won't show up in the second dropdown anymore once the value
in the first dropdown has changed. The problem is that afterward the
validation control for the second dropdown no longer works.

So do I need to validate the second dropdown manually? Any insight

Pages: 1
Prev: Html.LabelFor
Next: Visual Studio 2010 Quirk?