0
John,
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. 0
Sorry, I don't understand how this would help in my case? It seems the validators have a specific behaviour that can not be overridden?
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)
0
So there is no way to override the next button press for validation and have the client-side validation happen from the beginning? I am using the asp wizard if that helps.
0
hi
set causevalidation false for this button.
thanks
0
hi jon,
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.