Hey all I am designing a website in ASP.net from a PHP designed site. They do their form checks via JavaScript and then submit all data via Ajax if it passes validation.
Is it possible to fire off a piece of JavaScript from a submit button via code behind and read the returned value before I process to either postback to save the data or do nothing until the user corrects the fields indicated by the JavaScript?
If you are doing the validation in javascript, i would make a hidden submit button that gets clicked by the javascript button if the validation passes:
If you are validating in code behind, then why not just use a post back from a submit button?