DropDownList Validation
DropDownList Control Validation Using RequirdField Validation Before Inserting or Assigning Values Using in Asp.Net C#.
Download Coding
Download
DEMO
DropDownList Control Validation Using RequirdField Validation Before Inserting or Assigning Values Using in Asp.Net C#.
Download Coding
Download
DEMO
HTML CODING
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>Select City</asp:ListItem>
<asp:ListItem>New Delhi</asp:ListItem>
<asp:ListItem>London</asp:ListItem>
<asp:ListItem>Paris</asp:ListItem>
<asp:ListItem>Perth</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DropDownList1" ErrorMessage="Please Select City" ForeColor="#CC3300" InitialValue="Select City"></asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" Text="Submit" />
</div>
</form>
</body>
</html>
0 comments:
Post a Comment