创建MVC和剃刀向导步骤 [英] Create Wizard steps in MVC and Razor

查看:73
本文介绍了创建MVC和剃刀向导步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一种MVC应用程序创建帐户使用一个以上的向导步骤的用户。
我需要去与一个视图页面,并隐藏或显示由客户端逻辑的div或者我需要为每个向导不同的看法(使用局部视图)?

I would like to build one MVC application to create the account of a user using more then one wizard steps. Do I need to go with one view page and hide or display a div by client side logic or do I need to create different view for each wizard (using partial views)?

什么是最好的选择吗?我需要维护向导步骤之间的状态数据,使用户可以移回或下以及最后一步,他或她可以将它保存到数据库中。

What is the best option here? I need to maintain state data between wizard steps so the user can move back or next and on last step he or she can save it to the database.

推荐答案

有不同的可能性。您可以通过显示/隐藏部分或完整的服务器端解决方案中使用纯客户端解决方案。这是由你来决定哪一个是最适合你的特殊情况。这里是一个例子你可以看看,如果你决定去服务器端方法。

There are different possibilities. You could use a pure client side solution by showing/hiding sections or a full server side solution. It's up to you to decide which one is best for your particular scenario. Here's an example you might take a look at if you decide to go the server side approach.

这篇关于创建MVC和剃刀向导步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆