Click here to Skip to main content
15,886,012 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
I am trying to save a form with JQuery. I have a couple of questions as I am not much experienced with saving forms with JQuery.

1) How do I make a javascript array of JSON and send it to my webmethod ? Do I need a 3rd party library. If yes, which one ?
2) Once the JSON string is recieved by a webmethod, how do I convert it into a class object in csharp & pass it to my DB layer ?
3) How do I trigger asp.net validation before executing JQuery $.ajax post ?
4) Do I have to stop using ASP.net validation completely & use JQuery validation ?
5) How do I trigger my save form code in case of all validators being valid?
6) Do you recommend the JQuery path or should I just stick with UpdatePanels? I see JQuery is really exciting

I am using asp.net 2.0

Please help me, thank you.
Posted

Tried looking at this article[^]? It uses Jquery and JSON to post to the web method. Have a look.
 
Share this answer
 
Comments
zeego 2-Jun-11 4:33am    
Hey thanks that answers some of my questions. Do you have any idea regarding validation and overall JQuery path to choose over UpdatePanels in webforms ?
walterhevedeich 2-Jun-11 4:50am    
Never dealt with that scenario before but you can check Encosia.com as they also have lots of articles on AJAX.
zeego 2-Jun-11 5:31am    
oh ok, thanks for your reply Walter.
walterhevedeich 2-Jun-11 19:37pm    
no problem. :)
try dis link it might help u..
[^]
 
Share this answer
 
Comments
zeego 2-Jun-11 3:48am    
Hey that's not related with my question at all. Do you have any advice on questions I posted ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900