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
Murali Kris
1.5k
254
48.4k
RequiredField Validation controls then execute TextChanged
Aug 6 2019 6:18 AM
Hi Folks,
I have a webForm.aspx, it have textboxes, textbox is assosiated with fieldRequired validate control(RegularExpressionValidator,ReqiredFiledValidator) for general validations.
but here i also required TextBox_TextChanged event for other validation so issue
textbox_TextChanged event is executing before fieldRequiredvalidate controls(RegularExpressionValidator,ReqiredFiledValidator)
how to validate first fieldRequiredvalidate controls if everything fine then allow to execute textBox_Textchanged even.
i just googled and find blow link
https://forums.asp.net/t/1178403.aspx?How+to+stop+Textchanged+event+when+validator+is+fired+
my code.cs
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
if(!System.Text.RegularExpressions.Regex.IsMatch(TextBox1.Text,RegularExpressionValidator1))
{
Label2.Text = "from textChanged.";
}
}
error is: Can`t convert argument2 etc...
Note: TextBox is validating with two Required control(regularExpression,fieldRequired)
=> IsMatch(TextBox1.Text,
Regular_Expression
))
how to pass
Regular_Expression..?
or use regular_expression with RequiredFields Controls
please check above link for more details
Reply
Answers (
3
)
Multi threading use with entity framework save database
How to add Data in gridview from Dropdownlist ?