I’m using MVC 2 Pagination (not the jquery one) and my partial page gets refreshed in every 5 second.
I want to maintain my page number on refresh. Can you please suggest me how that can be done.
Here is the code for the page refresh in every 5 sec
setInterval(function () {
$.ajax(
{
type: "GET",
url: '<%=Url.Action("divtobeupdated", "DefaultController") %>',
data: {},
dataType: "text",
success: function (result) { $("#FileListContainer").html(result); }
}
)
}, 5000);
you can try 2 solution:
1) you pass the number of the page to the server and you pass it back to the view(no so good because you hace to change many code)
2) set a javascript global variable and you set it in the setInterval, like this:
I hope understund good your question.
Marco