开发者

asp MVC3 Wizard [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I'm building an application with MVC3. This application shold contain a 4-step wizard. T开发者_Python百科he user should be able to navigate to the next page and back without loosing the datas the user enterd. I've seen something about creating a class for each step an just changing the display style. Is that realy the best way? And what about the people who do not have Javascript?

lot of thanks, HW


When I need a component for ASP.NET MVC, I usually check what is available with JQuery, and there is a choice of third parties wizards on their website. JQWizard seems to me really lightweight, which is something I prefer, but you should check the other based on your criterias.

Now for the people who do not have javascript activated, you could handle your wizard as a single page form without the steps. Or just disable the form with a warning "works only with javascript activated", if you don't feel comfortable with having a second way to input data in your website.


You can definitely implement it without using Java Script, but is that really a constraint now a days?

What you can try doing is create a object to hold all the responses from the different wizard pages and have POST actions to redirect the user between different action methods (you could add type elements, one for forward and one for back.)

You can use the built in model binding system to have MVC 3 update the appropriate sections (corresponding to the different wizard pages) in the data object automatically for you.

Or, you could use the TempData[] dictionary to store the object during the POST or redirect.

However, still recommend that you implement a more Web 2.0 way and do it using jQuery/CSS.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜