ASP.NET MVC - Is IsPostBack still here?

前端 未结 11 2097
我在风中等你
我在风中等你 2020-12-09 17:09

I know, I know, I know. I shouldn\'t be doing webforms inside of MVC, I completely agree. But, the people who sign my paycheck will not approve a complete conversion of ou

11条回答
  •  感动是毒
    2020-12-09 17:38

    I would definitely take a look at this blog post by Scott Hanselman where he puts an aspx page in a MVC application.

    http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx

    Your controllers will not have access to the ViewState property. Even if you did want to handle the problem of __VIEWSTATE, you would have to do some work in order to get it into a usable form in an mvc controller. Good luck on coming up with a conversion strategy, no matter how it works out a lot of people would be interested to know kind of problems you would face in the process.

提交回复
热议问题