如何将ajaxoptions包含在以下表格中:
<form id="" action="<%=Url.Action("ChangePassword",new{Action="ChangePassword" }) %>" method="post" enctype="multipart/form-data">
答案 0 :(得分:0)
你使用的是什么javascript(如果有的话)库?
通常您在脚本中设置选项,而不是C#代码。
回答你的评论:
在JQuery w / Form Plugin中:
var options = {
target: '#output2' // target element(s) to be updated with server response
}
$(function() {
$("form").submit(function() {
$(this).ajaxSubmit(options);
return false;
});
});