【发布时间】:2011-07-27 22:20:54
【问题描述】:
我使用这个 Ajax.BeginForm
<% using( Ajax.BeginForm( "Create","Mandate",
new AjaxOptions( ) {
OnSuccess = "GoToMandates",
OnFailure = "ShowPopUpError"
} ) ) {%>
<% } %>
我需要在控制器中写什么来捕获这个 OnSucces 和 OnFailure。
因为 OnSuccess 我需要显示成功消息
OnFailure 我需要显示其他消息。
在我的控制器中
Public ActionResult GetSomething(FromCollection collection)
{
if(exists == null)
{
//OnSuccess
}
else
{
//OnFailure
}
}
anydboy 可以帮帮我吗.. 如何解决这个问题?
谢谢
【问题讨论】:
标签: asp.net ajax asp.net-mvc-2 jquery