Hi,
I am new to .Net and come from Java.
I have a form in a page. I tell the form to go to a second page in the Button object with postbackurl. Before, I make some validation using a CustomValidator. The method in the validator just sets the args.IsValid to false. In case of a bad validation, I am redirected to the second page, instead of staying at the same page, though the validation method is called.
My code:
Validation:
public void myValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args)
{
if (...)
{
args.IsValid = false;
}
}
Button definition:
Any hint on what goes wrong?
Thank you
Samuel