Skip to content Skip to sidebar Skip to footer

Mvc - Ajax Pager - Make Current Page Inactive Link

This is my ajax pager code below: Now I want to make sure that the link for the current page is unclickable and css should reflect that as well. My pager is keeping track of the

Solution 1:

progtick - i think you'd be better off creating an htmlhelper for this. I've done this in the past with great success. basically, it's a one liner:

/* the 1st param is your target div
   the 2nd parameter true/false merely indicates whether
   the helper should run in querystring postback or ajax mode
*/
<%=Html.Pagination("TargetDiv", true) %>

and here's how it looks (with unreserved apologies to SO for the obvious influence!!):

alt text

[update] you can grab a working example of this from here:

http://www.gatehousemusic.com/downloads/MvcApplication2.1.zip

let me know how you get on.

Post a Comment for "Mvc - Ajax Pager - Make Current Page Inactive Link"