2012-04-20 49 views
1

新的这一点,请耐心等待,如果我错过了这个地方的另一个答案。我尝试在Ajax.BeginForm中使用AjaxOptions,但它并未弹出,因此我转而在ActionLink中测试它,但仍无法使其运行。对于ajax.beginform和ajax.actionlink,它都会转到正确的控制器并继续运行,但我没有收到确认消息。AjaxOptions.confirm不会弹出在ActionLink或BeginForm中提交

我在做什么错?

感谢, ķ

从视野:

<script type="text/javascript" src="/Scripts/jquery.unobtrusive-ajax.min.js"></script> 

@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" 
} 
) 
+0

它通过Ajax发布到控制器吗?你有没有参考jQuery js库? – 2012-04-20 21:19:54

+0

您的代码原样没有错误。如果你没有,请确保你有这个页面上的“jquery.unobtrusive-ajax.min”JavaScript文件的引用。 – DMulligan 2012-04-21 04:50:27

+0

是的,我有对图书馆的引用。并且