How to change from VB6 Modal Userforms to ASP .NET?
I am thinking about migrating a VB6 (winform) application to the Web in ASP .NET (C#).
In the current VB6 program the screens structure works like this:
- Login screen - enter parameters - 开发者_开发问答takes you to
- Schedule screen - enter parameters - takes you to
- Barcode scanning screen - scan barcode - takes you to
- Piece count screen - enter piece count - go back to barcode screen
The top most screen(useform) must be dealt with before being able to go back to another form.
What would be the best route to take to mimic this behaviour in ASP .NET? Or would it be better to switch the screen-centric thinking to something else?
Is what you converting from a WebSite? My guess is no. Winforms would more closely model this behavior not ASP.NET.
However if you want to of ASP.NET you can do the same by each page 'Redirecting' to the next.
You could use the Wizard control, or a MultiView, in order to easy control the navigation process as you describe. Each "screen" becomes a separate wizard "step" template, only one of which is loaded and shown.
I'd say just rewrite it with one ASP.net page per screen. This would give you:
Login Screen -> Login.aspx
Schedule Screen -> Schedule.aspx
Barcode scanning screen -> Scan.aspx
Piece Count Screen -> pieces.aspx
On postback of the asp form it would redirect to the next page down the line. Alternately you could have multiple panels on the page that are set to visible or not depending on where the user is in the process:
asp:Panel ID="Scheduling" . . . .
asp:Panel ID="Scanning" . . . .
asp:Panel ID="PieceCount" . . . .
Whatever you find easiest.
精彩评论