Posted by Ricibald on April 19th, 2011
jQuery allows only to do a global form submit using
This method doesn’t allow to do a specific form submit when multiple <input type=”submit”> exists, like in many ASP.NET sites, where there are a single form with many buttons.
To achieve this and obtain an ASP.NET POSTBACK behavior simply use this snippet of jQuery code that builds a “submit simulation from input”:
// simulate submit from button "myButton" var input = $("<input>").attr("type", "hidden").attr("name", $('#myButton').attr("name")).val(""); $('form').append($(input)); $('form').submit();