How do you force Visual Studio 2008 to generate designer.cs e.g. Whatever.aspx.designer.cs

后端 未结 2 813
广开言路
广开言路 2021-01-21 20:27

I have some webforms in an Asp.Net V2.0 generated using Visual Studio 2005 using Web site technology

Want to import them in to Visual Studio 2008 set to v3.5 (Asp.Net M

相关标签:
2条回答
  • 2021-01-21 21:12

    You have to make sure that your project is a Web Application (and not a Website). Then, You can right-click on the file or the project and select "Convert to Web Application". If all goes well, the designer file will be created. If not, then there is a parsing error in the page.

    But if you want your project to truly be a MVC application, then you should not be using code-behind files for your webpages (Views), so you need to refactor the codebehind classes into Controllers. See this article why not:

    http://stevesmithblog.com/blog/codebehind-files-in-asp-net-mvc-are-evil/

    0 讨论(0)
  • 2021-01-21 21:13

    Right-click your aspx file and select Convert to Web Application.

    0 讨论(0)
提交回复
热议问题