Help submitting an asp.net form with jquery

Posted by batman_man on Stack Overflow See other posts from Stack Overflow or by batman_man
Published on 2010-06-07T13:24:57Z Indexed on 2010/06/07 13:32 UTC
Read the original article Hit count: 249

Filed under:
|

I'm trying to post the entire asp.net form to a certain url.

I have tried:

$.post("http://www.someaddress.com", $("form").serialize());

I have also tried:

$.ajax({
    type:"POST",
    url:"http://www.someaddress.com",
    data: $('form').serialize(),
    success: function(){
        alert('yay');
    }
});

In both cases the submit is fine but no data is passed along with it.

When i test the form.serialize() in firebug console, this shows my form serialized just fine. When i view the submit in fiddler, i can see that the data part is not set. Maybe im not understanding the data part, but every single tutorial shows this as the way to go -> serialize the form and set that as data. What must i do to get my serialized form as the data in my request?

What am i missing? Also - why does the NET tab in firebug show all these requests as method OPTIONS?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery