Hi,
I'm relatively new to ajax, but have an idea i'd like to try.
Is there any way to call a server side method that is able to access the values of items on a form, i.e post a form for validation, but without doing an entire page postback, and return a string with the validation results?
I'm having trouble figuring out how post a form without doing a postback.
Thanks in advance.
Chris
Hi,
The short answer is no. There's no way to "post" a form for validation without doing a partial postback which still causes the server lifecycle to be executed.
The solution that you're looking for is to execute a web service (or page method if you so chose) from client code that takes as parameters the current values of the form fields you're attempting to validate. You would execute the web service from client side JavaScript and grab the current values of your needed form fields also using JavaScript.
Look at the docs that describe executing a web service from client code.
No comments:
Post a Comment