开发者

ASP.NET back and forth between screens

I am working on an application, where a user can start filling a (multipage)form and press back button to navigate to previous screen and continue button to navigate to next screen.

Currently, the page was implemented using the browser's back capability. This causes circular reference

The Scenario is

  1. Navigate from page 2 to page 3 click back button on page 3
  2. 开发者_开发技巧
  3. User is now in page 2 and clickint back button pn page 2 will take it to page 3 (because of browser's history has page 3.)

This has to be achieved by using session? How can this be implemented correctly? What options does asp.net provide?


Have a look at the Wizard control - it's designed for your sort of scenario where you have multiple pages and you want to go back and forth between them. And you can combine it with AJAX to avoid postbacks :-) ScottGu has a piece on it here.


You can save all steps in session variable, for example of type Queue. When you need return two steps back, simple, two times dequeue and go to uri.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜