How to: Back button support “Ajax”

前端 未结 3 1824
逝去的感伤
逝去的感伤 2021-01-03 10:22

I have an asp.net ajax website, it full of things happen on the same page without page reload, such as sorting records, paging,... When the user go to another page in the sa

相关标签:
3条回答
  • 2021-01-03 10:45

    You do what the history plugin suggested above does. I'm assuming under the hood, this is what is going on. When your async-postback comes back to the client side for example, do a JavaScript call to window.location = 'somePage.aspx#anchor1' (an old school HTML anchor), then the next async-postback once back on the client would do window.location = 'somePage.aspx#anchor2', etc. GMail does this when it redirects to your inbox or other labels or folders in your e-mail.

    Hope that helps, Nick

    0 讨论(0)
  • 2021-01-03 10:53

    I've heard that this is usually solved by using an iframe instead of XMLHttpRequest. I don't know how to incorporate this advice in an ASP.Net webapp.

    0 讨论(0)
  • 2021-01-03 11:09

    You dont need 3.5 for the history control, check ScottGu's blog here

    Also check if this article helps

    0 讨论(0)
提交回复
热议问题