开发者

Using Html.RenderAction and Ajax.ActionLink together

when i do this, i get the ACTION being called TWICE, what should i do about this?

if i call html.partial instead to just render the control, then i need to specify all the objects/values manually, which i shouldn'开发者_如何学JAVAt need to do this as the ACTION itself takes care of this stuff.

i maeks sense to have both these work together but they don't, what should i do?


An Ajax.ActionLink is used to asynchronously update an area of a page with the result of a controller action when the link is clicked. Html.RenderAction renders the result of a controller action during the initial rendering of the page.

If you had your Html.RenderAction calling the same action as your Ajax.ActionLink, and the Ajax.RenderAction was inside the target div of the Ajax.RenderAction, then the action would be called twice whenever the Ajax.RenderAction was invoked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜