The RegularExpressionValidator control is used to ensure that an input value matches a specified pattern. It's used for email validate,numbervalidate, url validtate, special symbol validate, etc.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
The RegularExpressionValidator control is used to ensure that an input value matches a specified pattern.
It's used for email validate,numbervalidate, url validtate, special symbol validate, etc.
Syntax for Regular Expression Validator
<asp:TextBox ID="txtEmailID" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="revEmailID" runat="server"
ControlToValidate="txtEmailID"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>