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
srinivas rao
NA
49
0
custom validator is not firing on the server side code
Sep 12 2019 6:25 AM
Hi Friends,
working on the cusom validator in aspx page and validation method from the server side writen but it not firing the method
aspx page
<td style="width: 25%; height: 21px" rowspan="1" colspan="1" style="border-collapse: collapse" class="br-td3">
<asp:TextBox ID="txtName" runat="server" MaxLength="30"></asp:TextBox>
<asp:CustomValidator ID="valName" runat="server"><img src="images/error.gif" /></asp:CustomValidator>
<asp:CustomValidator ID="valNamen" runat="server" Display="Dynamic" ForeColor="Red" ErrorMessage="" OnServerValidate="valNamen_ServerValidate"></asp:CustomValidator>
</td>
and in the server side written the code like this
protected void valNamen_ServerValidate(object source, ServerValidateEventArgs args)
{
if (txtName.Text == string.Empty)
{
valNamen.ErrorMessage = "Please enter Valid Name.";
args.IsValid = false;
}
}
but th method is not firing any time.
let us know if any thing i am missing here
Reply
Answers (
1
)
Integrate CCAvenanu Payment Gateway to Dot net core api 2.0?
How to clone entire div in angular