ASP.Net MVC partial views keeping their model state?

前端 未结 5 1449
小蘑菇
小蘑菇 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 19:52

    You could explicitly specify the view to return:

    return View("~/Views/Home/Index.aspx", model);
    

    This way error information will be preserved and correct view rendered.

提交回复
热议问题