MVC 3 Ajax.ActionLink with JQuery UI Confirm Dialog

前端 未结 6 1402
攒了一身酷
攒了一身酷 2020-12-29 15:55

I have a @Ajax.ActionLink which calls a Delete Action. Now I want to use JQuery UI Dialog confirm instead the regular \"Confirm\" attribute of the Ajax link. I hook the eve

6条回答
  •  [愿得一人]
    2020-12-29 16:39

    Maybe you can try calling a confirmation function from the OnBegin event of Ajax.ActionLink? That way you can keep using the Ajax.ActionLink. The OnBegin even is marked up as data-ajax-begin attribute so have jquery assign "return YourConfirmationFunction()" to this attribute and you should be fine. Here's an example of using OnBegin for confirmation dialog without jquery.

提交回复
热议问题