|
Validate an email address entered into a Textbox, using a validator control. |
| Extended
Description
|
<asp:TextBox id="txtEmail" size="30" runat="server" /> <asp:RequiredFieldValidator runat="server" id="validEmailRequired" ControlToValidate="txtEmail" errormessage="Please enter an email address." display="Dynamic" /> <asp:RegularExpressionValidator runat="server" id="validEmailRegExp" ControlToValidate="txtEmail" ValidationExpression="^[\w-]+@[\w-]+\.(com|net|org|edu|mil)$" errormessage="Please enter a valid email address." Display="Dynamic" />
|
|
|
|
Total Views:13252
| Today:748
|
Total Hits:961
| Today:0
|
|