maztt
maztt

Reputation: 12294

ajax.actionlink

how can i accomodate Html.RouteLink in( ajax.actionlink with updatetargetid="divid")in

Upvotes: 0

Views: 443

Answers (1)

Chao
Chao

Reputation: 3043

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.

Upvotes: 1

Related Questions