jquery - How to use pagedlist with ajax for multiple partial view -
i have page list things in partial view. , in partial view use pagedlist mvc pagination. because list in partial view use ajax option of pagedlist helper below:
@html.pagedlistpager(model.item1, page => url.action("getlist", "chome", new { mid = viewbag.mid, pageidforownlist = page }), pagedlistrenderoptions.enableunobtrusiveajaxreplacing(new ajaxoptions() { httpmethod = "get", updatetargetid = "grouplist" })) everything fine till that. make search in list , represent search result in new partial view (in same container/div after clenaing out container/div). in partial view use pagedlist ajax option below.
@html.pagedlistpager(model, page => url.action("search", "chome", new { mid = viewbag.mid, pageidforlist = page }), pagedlistrenderoptions.enableunobtrusiveajaxreplacing(new ajaxoptions() { httpmethod = "get", updatetargetid = "grouplist" })) but after second, if click 1 of page numbers, makes 2 calls method instead of 1 call. know should unbind can't find should unbind. help?
if has same problem, because of loading unobtrusive-ajax library more once (in every partial view ). better load library in main window. yes sounds stupid mistake wanted answer anyway help, if same mistake.
Comments
Post a Comment