【问题标题】:MVC Ajax.beginform Custom Confirmation DialogueMVC Ajax.beginform 自定义确认对话框
【发布时间】:2013-09-20 13:30:12
【问题描述】:

是否可以通过以下方式实现我自己的确认对话?

Ajax.BeginForm(new AjaxOptions { Confirm ="" })

谢谢:)

【问题讨论】:

    标签: c# asp.net-mvc asp.net-ajax


    【解决方案1】:

    如果您没有找到答案,请检查以下问题中实现的 (OnBegin) 函数: Ajax.BeginForm Confirmation Dialog onBeginForm() before triggering OnSuccessForm()

    【讨论】:

      【解决方案2】:

      Ajax BeginForm 向控制器发送数据。 您需要使用 Ajax ActionLink 为了显示一些确认消息,请尝试以下操作:

      @Ajax.ActionLink(
      "Revoke Access to all Galleries Immediately", 
      "ViewInvites", 
      "Gallery", 
      new AjaxOptions { 
      Confirm = "Are you sure you want to revoke access to all galleries? This cannot be    undone.",
      HttpMethod = "Post"
      }
      )
      

      【讨论】:

      • Ajax.BeginForm 让您可以像 ActionLink 方法一样启动确认对话。我很好奇我是否可以拥有自己的确认功能而不仅仅是一条消息。
      猜你喜欢
      • 2013-05-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-14
      • 2012-06-05
      相关资源
      最近更新 更多