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
manjula d
NA
172
139.7k
using custom validator to validate an regular expression
Jun 3 2013 6:08 AM
hello sir,
by using custom validator to validate an regular expression with email id how to write a code in OnServerValidate propertie anybody can help me to solve please................
below of my code is:
Client Side Javascript:
function ValidateEmailId(source, args) {
var rdbemailid = document.getElementById("<%=rdb_No.ClientID %>");
var emilid = $("#<%= txtEmail.ClientID %>").val();
if (rdbemailid.checked) {
if (emilid == "") {
args.IsValid = false;
}
else {
args.IsValid = true;
}
}
}
<asp:TextBox ID="txtEmail" runat="server"/>
<asp:CustomValidator ID="cvemail" runat="server" ClientValidationFunction = "ValidateEmailId" OnServerValidate = "validateserver" Text="Please Enter EmailId" ControlToValidate="txtEmail" ValidateEmptyText="true" ErrorMessage="Please Enter Valid EmailId" ForeColor="Red"></asp:CustomValidator>
Reply
Answers (
5
)
Design simple Application
visual csharp