I've achieved to make my page auto refresh every 20 seconds, but now I want to do it in another section and I have a slightly different situation.
The difference is that now the page is refreshed using ajax, so the query string in the URL doesn't change. In the other situation, the query string parameters matched the controller method parameters when the automatic post was made, so it worked fine.
I want to know if there's a way to change the url 'artificially' when the ajax request is made, or if somebody can give me a well explained solution for this issue. I'm relatively new to MVC.
You could get the current URL in Javascript using,
var url = window.location.href;
You can then use this in your refresh
function.