开发者

ASP.NET MVC 2 Reload pages without refresh and keep URL changing

I am creating a project using ASP.NET MVC. I want to show content of pages in the placeholder without refreshing th开发者_JS百科e page, something like ajax but WITH the URL changing, How can I accomplish this ?

Thank you for your responses


If you change the url of the browser this will automatically perform a redirect and refresh the entire page. You could use the hash sign (#) which doesn't trigger a refresh. For example if you change /home/index#foo to /home/index#bar the page won't refresh but you could send an AJAX request behind the scenes to update some placeholder.


I've used the jQuery BBQ plugin (http://benalman.com/projects/jquery-bbq-plugin/) with great success. This and the jQuery Templating engine would be great for what you are trying to accomplish.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜