ASP.Net MVC partial views keeping their model state?

前端 未结 5 1454
小蘑菇
小蘑菇 2021-02-08 19:43

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 20:10

    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.

提交回复
热议问题