Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Validation fails, form submits anyway

I cannot understand for the life of me why my validation isn't working...

Basically, i'm using a custom validator that calls  a server side function, if it's incorrect it calls args.Value = false;

Yesterday this worked absolutely fine, now i've added one that does much the same sort of thing and now both of them have just stopped working, i can step all the way through my code and it hits the args.value=false statement and then just submits the form anyway!

Why why why???

I should add that i'm assigning any old control the the ControlToValidate property, in the server side event i'm just using my own logic. At the end of the day, in the actual submit routine the Page.IsValid property is false!

Any help would be greatly appreciated
  • 3
1 Solution
Rob_SavilleAuthor Commented:
Ok i could do if (Page.IsValid)  

but should that just happen automatically???
Form submission has to take place if you have a server side validator. Otherwise how will the code gets executed to figure out of the page is valid or not.
Does the page show error or not, if validator sets the state to false?
Rob_SavilleAuthor Commented:
I've sorted it.

Cheers anyway.
Rob_SavilleAuthor Commented:
A because, i duno really.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now