开发者

ajax.actionlink

开发者 https://www.devze.com 2023-01-04 09:41 出处:网络
how can i accomodateHtml.R开发者_Go百科outeLink in( ajax.actionlink with updatetargetid=\"divid\")in

how can i accomodate Html.R开发者_Go百科outeLink in( ajax.actionlink with updatetargetid="divid")in


Why not use Ajax.RouteLink?

<% AjaxOptions ajaxopts = new AjaxOptions(){HttpMethod="Get",
InsertionMode=InsertionMode.Replace,
UpdateTargetId="divid"}; %>

<%=Ajax.RouteLink("First","Pager",ajaxopts, new {page=1})%>

Just make sure that your Route returns a partial view for the pager, not the whole view. Either via a separate action or through a bool in the route to return either View or Partial.

0

精彩评论

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