How to send parameter in query string on ajax call in asp.net mvc -


i want send selected page value on querystring while navigating through paging.

the url generated paging this:

link/index?page=2 link/index?page=3 

but on url shows link/index , performs ajax call. if disable javascript , navigate through paging gets postback , has url like

link/index?page=2 

which perfect. want type of url in ajax call well.

how can this? issue if navigate through pages when javascript enable shows link/index , when user goes page no 2 3 4 , press button goes press page instead of page 3 page 2.

here code generates page links:

    <%= ajax.pager(         new ajaxoptions {              updatetargetid = "divgrid", loadingelementid = "divloading"          },          viewdata.model.pagesize,          viewdata.model.pagenumber,          viewdata.model.totalitemcount,          new { controller = "linkmanagement", action = "index" }     )%> 

this isn't issue pager, that's how ajax works. because haven't created new full page request, nothing stored in history allow button persist ajax calls too. need use jquery.history (http://tkyk.github.com/jquery-history-plugin/) or jquery address api (http://www.asual.com/jquery/address/samples/api/#/section/?id=2.2).


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -