How to add ajaxoptions to form
How can I have ajaxoptions included in the following form:
<form id="" action="<%=Url.Action("ChangePassword",new{Action="ChangePassword" }) %>" method="开发者_如何学Cpost" enctype="multipart/form-data">
What javascript (if any) library are you using?
Generally you set the options in script and not C# code.
To answer your comment:
In JQuery w/ Form Plugin like:
var options = {
target: '#output2' // target element(s) to be updated with server response
}
$(function() {
$("form").submit(function() {
$(this).ajaxSubmit(options);
return false;
});
});
精彩评论