web 2.0

ASP.NET(vb.net) & RequirdFieldValidator

ASP.NET(vb.net) & RequirdFieldValidator - asp:RequirdFieldValidator : Makes the associated input control a required field.

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

ASP.NET(vb.net) & RequirdFieldValidator

Tag Control

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>

Example

RequiredFieldValidator.aspx

<%@ Page Language="VB" %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server">
Name<br />
<asp:TextBox id="txtName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="myReqValid1" runat="server" ErrorMessage="Please input [Name]"
ControlToValidate="txtName"></asp:RequiredFieldValidator><br />
Email<br />
<asp:TextBox id="txtEmail" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="myReqValid2" runat="server" ErrorMessage="Please Input [Email]"
ControlToValidate="txtEmail"></asp:RequiredFieldValidator><br />

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

Screenshot

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

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 10.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.