I am having an odd issue with the ASP.Net MVC 4 formcollection for a submitted form. Here are the facts of the situation:
Why is there is a difference?
I thought that if the actionlink button simulated a click of the form submit then it would do the very same thing as if the form submit had been pressed itself but apparently that is not so. Why Not?
Try something like this:
$('#outsideFormbutton').on('click', function()
{
// This will call your form submit button
$('#formButton').click();
});
$('#formButton').on('click', function(e)
{
// Prevents the default action of the form button
e.preventDefault();
// Manually submit your form
$('#myForm').submit();
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.