{
HttpMethod = "Post",
OnSuccess = "OnSuccessPost",
InsertionMode = InsertionMode.Replace
}))
{
#代码
}
ajax提交表单到控制器上的方法,并且返回执行 OnSuccess的方法
function OnSuccessPost(e)
{
alert(e)
}
若返回的不是所请求的页面则为
[HttpPost] public ActionResult PersonalDate(View_User_UserInfo_Lever model) { string script = ""; if (userPage.IsUserLogin()) { bll_view_ULL.SaveUser(model); script = "保存成功"; return Content(script); } script = "保存失败>"; return JavaScript(script); }
原文链接:https://www.f2er.com/ajax/164100.html