Archive, ASP.NET

Validating Drop Downs In ASP.NET – Part 1

Jason / December 19, 2007

User input validation is an important component in any user interface. In the realm of web development a response UI is extremely important to the users experience.

If you are like myself, programming in JavaScript does not come easily to you. Fortunately, ASP.NET contains several validator controls that allow for client side form validation without you having to program any JavaScript.

Take for example a simple drop down control.

<asp:DropDownList ID="ddlSampleDropDown" runat="server"> <asp:ListItem Value="">--please select one--</asp:ListItem> <asp:ListItem Value="1">Apples</asp:ListItem> <asp:ListItem Value="2">oranges</asp:ListItem> </asp:DropDownList> read more