Best practice for a multipage/form mvc web app

后端 未结 3 1679
没有蜡笔的小新
没有蜡笔的小新 2021-02-09 03:28

I have a project using ASP.Net MVC & EF5. The Model has a large enough number of fields that the app will need several pages to collect all of the data.

Once the da

3条回答
  •  孤独总比滥情好
    2021-02-09 03:52

    I actually came across this article , which was very informative and helped me : https://blacklineit.com/2015/10/14/rolling-your-own-viewstate-in-asp-net-mvc/

    Basically the article comes down to this : "The easiest and cleanest way I found to persist data between pages is to use the great Newtonsoft JSON library to serialize viewmodel into a single hidden field, and deserialize on POST requests. "

    Read it to get the background and additional info.

提交回复
热议问题