CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: C#

Asp.Net MVC && jQuery: degrading ajax pager

377 Views
Copy Code Show/Hide Line Numbers
// controller
public ActionResult Index([DefaultValue(1)] int page)
{
   if (Request.IsAjaxRequest())
      return PartialView("PagedDataControl", model.Data);
 
   return View(model);
}
 
// .aspx
$('#pager a').live('click', function(evt) {
    evt.preventDefault();
    $('#tabs-1').load($(this).attr('href'));
});
by andreabalducci
  March 30, 2010 @ 10:19am
Tags:

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate