Hi Guys,
We have an asp wizard set up that has some text boxes etc in it. We use RequiredFieldValidator for some of these and some other validators also.
The default behaviour seems to be that you can tab from field to field initially with no validation but after you press next it turns on the in-line validation that seems to happen on-the-fly.
Does anyone know if there is anyway to control this? i.e. it is on-the-fly all the time or only updates when next is pressed? (ideally the former)
Cheers.
Loading

ajay rajuRank #4,639 · 333 reputationPosted May 10, 2010, 4:42 AM EDT
Basically Validation controls of asp.net is validated on client - side. but first time it validate only you click submit button and next time also it validates client side not a server side validation.
if you want to show validtions when you click button you must write manual coding, (or) try to use validation summary control,
may be it helpful to you.
Thanks.
CrishRank #1,487 · 1.1K reputationPosted May 10, 2010, 6:18 AM EDT
set causevalidation false for this button.
thanks
Jon H18 reputationPosted May 10, 2010, 6:22 AM EDT
Jon H18 reputationPosted May 10, 2010, 11:42 PM EDT
I either wants constant on the fly validation i.e. validators flag as and when i leave cells.
OR
I want validation to only update when you press some button (next in my case as I am using a wizard)
Jaish MathewsRank #225 · 11K reputationPosted May 11, 2010, 1:36 AM EDT
Vlidator will be fired on any click only. Just pressing tab won't fire validator controls. 1st check that this validation is from validatorcontrol itself.
Now You can make all validator control to "Enabled=False". Then none of them will fire. Later you can make them fire in click like below.
protected void Button1_Click(object sender, EventArgs e)
{
//Enabling ValidatorControl
RequiredFieldValidator1.Enabled = true;
//Firing all validator controls in page manually
Page.Validate();
//Check that specific ValidatorControl passed the validation or not. If passed, then only server activities
if (RequiredFieldValidator1.IsValid)
{
Response.Redirect("http://www.google.cpm");
}
}
NB:The above example only for a single ValidatorControl. You need to do this for each and evry ValidatorControls you have. You can use Page.Validators to loop through each and every ValidationControls of a page.