ASP.NET MVC:Ajax.Actionlink不带参数的工作原理 [英] ASP.NET MVC: Ajax.Actionlink Does not work with parameters
问题描述
<%= Ajax.ActionLink("DrillDown", "EventOverzichtAjax", new { GroepID = Model.GroepID.ToString(),
groepType = Model.GroepType.ToString(),
manager = Model.isManager },
new AjaxOptions { UpdateTargetId = Model.GroepID.ToString(),
OnBegin = string.Format("beginOverzichtFetch('{0}')", Model.GroepID),
OnComplete = string.Format("completeOverzichtFetch('{0}')", Model.GroepID)}) %>
我在与onBegin和onComplate性能的一些问题。 他们的工作很好,因为我想要的。但他们不这样做,当我试图通过与函数中的参数。
I'm having some issues with the onBegin and onComplate properties. They work perfectly as i want. But they do not when i'm trying to pass a parameter with the function.
例如:
OnBegin = "beginOverzichtFetch"
完美。但
OnBegin = "beginOverzichtFetch(1)"
不工作的。当我使用Chrome检查,看看那里发生了故障:
Does not work at all. When i use chrome inspector to see where the fault occurs:
什么时候会发生我的链接: 没有得到更新,但我得到重定向到局部视图。
What happens when my link: Nothing gets updated but i get redirect to the partial view.
任何人都知道如何将参数传递给函数在onBegin物业?
Anyone knows how to pass parameters to functions in the onBegin property?
帮助将AP preciated!谢谢!
Help would be appreciated! Thanks!
推荐答案
我还没有尝试过,但是这看起来像你的问题
I have not tried it but this looks like your problem
http://forums.asp.net/t/1414473.aspx
这篇关于ASP.NET MVC:Ajax.Actionlink不带参数的工作原理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!