ASP.Net MVC partial views keeping their model state?

前端 未结 5 1974
灰色年华
灰色年华 2021-02-08 19:34

This is probably again a newbie question.

When I create an ASP.NET MVC2 application, an Account Controller with an Action LogIn is created like this:

[H         


        
5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-08 19:51

    Take a look at practice #13 on this blog. This method works well to pass modelstate information when you're coding in the PRG (Post-Redirect-Get) style. You'll just need to create a couple of action filters and apply them to your get and post actions as appropriate.

提交回复
热议问题