0

I can't seem to get the jQuery.ajax() function posting back any of my asp.net generated form controls.

I've put a break point on the server side and there aren't any values.

Is there a way around this or do I have to build up a list of what I want sent back?

Another question slightly off topic, but it seems that although jQuery is a great JS library, it doesn't seem to integrate too well with .net.

Has anyone given up with jQuery to perform server side interaction and just gone with ms ajax implementation?

1
  • 1
    As a side note, jQuery integrates much better with ASP.Net MVC than it does with WebForms, simply because in WebForms there is already so much JavaScript written that you'll have to override, change or simply rewrite. In MVC you "do it yourself" already from the beginning, which makes it a lot easier to choose. Commented May 31, 2009 at 13:35

1 Answer 1

0

The reason for this is because asp.net webforms doesn't use a normal post (ie. with an input/submit button). if you take a look at how those are posted, there is some javascript handler that ends up calling a built-in function that asp.net writes out to the page called __doPostBack.

Check out this other stackoverflow answer that might give you additional clues: Jquery asp.net Button Click Event via ajax

To your second question, once you work out a few of the kinks, jQuery is a fantastic lib that has a ton of support and reference material both on the web and in books. Keep at it and you won't regret it :-)

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the link Joel. Its a shame that one must perform hacky type code in order to get things working. Makes long term support a nightmare :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.