Last post Mar 10, 2011 10:02 AM by maneeshkm
Aug 25, 2008 08:17 AMemail@example.com|LINK
I have to conditionally validate the text boxes using
required field validations.
How can I achieve conditional validation in asp.net
required field validator
ASP .net ... c#
Aug 25, 2008 09:46 AM|Ganesh@Nilgris|LINK
google for "required field validation"
Aug 25, 2008 10:03 AM|malcolms|LINK
Every RequiredFieldValidator control has an Enabled property. If that is set to false, validation will not occur. If it is true, validation will occur. Set this to enable conditional validation.
For example, if you had a text box and you wanted validation to occur if the user types in "Fred", you could check the Text property and enable validation from this:
protected void Page_Load(object sender, EventArgs e)
reqFirstname.Enabled = txtFirstname.Text == "Fred";
Aug 25, 2008 01:15 PMfirstname.lastname@example.org|LINK
Its posting back page. on conditional validation. How can I achieve it without posting back the page.
Aug 25, 2008 05:26 PM|Ganesh@Nilgris|LINK
u have start with "ajax" to do asynchronous postback.
Aug 26, 2008 04:49 AM|malcolms|LINK
You would need to use AJAX and an UpdatePanel.
Aug 26, 2008 07:43 AM|codenenterp|LINK
Mar 10, 2011 10:02 AM|maneeshkm|LINK
You dont want to go school again , answer is here in internet itself. :) Please see the link below. Hope this would solve your issue.
Maneesh , IND