TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
venky n
NA
110
38.5k
button submit time view validation error message using asp.n
Apr 3 2015 5:03 AM
how to give button submit time view missing value validation error message
<table style="width: 846px; height: 84px; margin-right: 0px;">
<tr>
<td align="center" colspan="2" style="height: 4px">
<asp:Label ID="Label32" runat="server" Font-Bold="True" Font-Italic="True"
Font-Underline="True" Text="Personal Details"></asp:Label>
</td>
</tr>
<tr>
<td align="right" style="width: 393px; height: 30px;">
<asp:Label ID="Label57" runat="server" ForeColor="Red" Text="*"></asp:Label>
<asp:Label ID="lblname" Font-Names="Calibri" Font-Size="12pt" runat="server" Text="Name :"></asp:Label>
</td>
<td style="height: 30px"><asp:TextBox ID="txtname" placeholder="Name" Font-Names="Calibri" Font-Size="12pt"
runat="server" onkeypress = "javascript:capFirst(this);"
Height="20px" style="margin-left: 0px" ToolTip="Checking the Name Popup"
Width="130px" MaxLength="60"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtname" ErrorMessage="Enter Your Name!!!" ForeColor="Red"
SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:FilteredTextBoxExtender ValidChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ." ID="txtname_FilteredTextBoxExtender"
runat="server" Enabled="True" TargetControlID="txtname"> </asp:FilteredTextBoxExtender>
</td>
</tr>
<tr>
<td align="right" style="width: 393px; height: 7px;">
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
ControlToValidate="txtE" ErrorMessage="Enter a Mail ID!!!" ForeColor="Red"
SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:Label ID="Label58" runat="server" Font-Names="Calibri" Font-Size="12pt" ForeColor="Red" Text="*"></asp:Label>
<asp:Label ID="lblemail" runat="server" Font-Names="Calibri" Font-Size="12pt" Text="Email_Id :"></asp:Label>
</td>
<td style="height: 7px">
<asp:TextBox ID="txtE" Font-Names="Calibri" Font-Size="12pt" runat="server" placeholder="Email Id"
Height="20px" Width="130px" MaxLength="60" ></asp:TextBox>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtE"
ForeColor="Red" ErrorMessage="* Please enter a valid email address"
ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
SetFocusOnError="True"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td align="right" style="width: 393px; height: 19px;">
<asp:Label ID="Label59" Font-Names="Calibri" Font-Size="12pt" runat="server" ForeColor="Red" Text="*"></asp:Label>
<asp:Label ID="Label37" Font-Names="Calibri" Font-Size="12pt" runat="server" Text="Primary Phone Number :"></asp:Label>
</td>
<td style="height: 19px">
<asp:TextBox ID="txtphoneno" Font-Names="Calibri" Font-Size="12pt" runat="server" placeholder="Phone No" onkeypress="return onlyNumberX(event)"
Height="20px" OnTextChanged="txtphoneno_TextChanged" AutoPostBack="True"
Width="130px" MaxLength="12"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtphoneno" ErrorMessage="Enter Your Mobile Num!!!"
ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:FilteredTextBoxExtender ID="txtphoneno_FilteredTextBoxExtender"
runat="server" Enabled="True" TargetControlID="txtphoneno" ValidChars="1,2,3,4,5,6,7,8,9,0" FilterType="Numbers"></asp:FilteredTextBoxExtender>
</td>
</tr>
</table>
<table style="width: 866px">
<tr>
<td align="right">
</td>
<td style="width: 64px"></td>
<td colspan="2" align="center" style="width: 545px">
<asp:Button ID="Btnsubmit" runat="server" Text="Submit"
onclick="Btnsubmit_Click" />
<asp:Button ID="btncancel" runat="server" Text="Cancel"
onclick="btncancel_Click" />
</td></tr></table>
Reply
Answers (
1
)
How to give Validation controls in asp.net
how platform developed