JQuery ASP.Net Webforms AJAX

I have a separate web form (no master page) that opens in a div from another page. A separate page uses jquery to navigate the user through a non-linear questionnaire. At the end of the questionnaire, the result is displayed using the "full" button. When the user clicks on the full button, the result is posted back to the parent / main div page.

I have a new requirement where I need to pass the question and answer id to code or web service where I can insert the question and answer id into my DB.

None of the things I need require serializing objects. I want to keep it as simple as possible. None of the items in the questionnaire are server controls .. just regular select buttons or groups of radio buttons. I suppose I could do ajax postback using refresh bar or something, but not sure if creating runat = server controls would mess up all the jquery / js I work on in the questionnaire.

Any help is appreciated!

+2


a source to share


1 answer


I would handle this by using jQuery to post data to a web service, which is pretty trivial. There are some code examples to do this from asp.net here:

jQuery: Ajax call to asp.net webservice fails, server return error 500

and



Calling a web service via jquery cross domain

To answer your other question, setting runat = "server" will not affect jQuery's ability to parse elements in the DOM.

+3


a source







All Articles