Possible Duplicate:
ASP.NET postback with JavaScript
I have a page without a form. But I need that everytime that this page is requested, the postback is done by the javascript.
How can I do the PostBack via Javascript ?
Possible Duplicate:
ASP.NET postback with JavaScript
I have a page without a form. But I need that everytime that this page is requested, the postback is done by the javascript.
How can I do the PostBack via Javascript ?
You can use the jQuery.post()
method.
http://api.jquery.com/jQuery.post/
Example:
$.post("test.aspx", { name: "John", time: "2pm" } );
My understanding is you cannot do a postback without a form tag - period. A form is an essential part of how the ViewState works.
You can use javascript to drive the browser to a different URL, or reload the current URL, if that's what you're looking for. However, that's not an ASP.NET postback.