In part 1 of Validating Drop Downs In ASP.NET we discussed how to use the Required Field Validator to provide responsive client side validation of form controls without directly writing JavaScript. In this post we are going to discuss how to allow postbacks without validating form controls.
Day: December 19, 2007
Validating Drop Downs In ASP.NET – Part 1
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>