web 2.0

ASP.NET(vb.net) & RegularExpressionValidator

ASP.NET(vb.net) & RegularExpressionValidator - asp:RegularExpressionValidator : Evaluates the value of an input control to determine whether it matches a pattern defined by a regular expression.

ShotDev Focus:
- ASP.NET(vb.net) & RegularExpressionValidator

ASP.NET(vb.net) & RegularExpressionValidator

Tag Control

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator"></asp:RegularExpressionValidator>

Example

RegularExpressionValidator.aspx

<%@ Page Language="VB" %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server">
Input Email<br />
<asp:TextBox id="txtEmail" runat="server"></asp:TextBox>&nbsp;
<asp:RegularExpressionValidator id="myRegValid" runat="server"
ErrorMessage="Please input [Email]" ControlToValidate="txtEmail"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator><br />

<asp:Button id="btnSubmit" runat="server" Text="Submit" />
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & RegularExpressionValidator
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.