ASP.Net MVC partial views keeping their model state?

前端 未结 5 1972
灰色年华
灰色年华 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:43

    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.

提交回复
热议问题