如果在Visual Studio中选择"转换为Web应用程序"选项,该怎么做?
时间:2020-03-05 18:59:27 来源:igfitidea点击:
如果在Visual Studio中选择该选项,它将转换为Web应用程序做什么?如果我确实将网站转换为Web应用程序,有什么优势?我可以回去吗?
解决方案
回答
好吧,它将网站转换为Web应用程序项目。至于优点,这里是一些进一步的阅读:
MSDN比较-比较网站项目和Web应用程序项目
ASP.NET上的网络广播-Visual Studio 2008中的Web应用程序项目与Web站点项目
"在此网络广播中,应要求,我们检查了Microsoft Visual Studio 2008中Web应用程序项目和网站项目之间的区别。我们特别关注我们选择一个选项的原因,并解释了在创建Web时如何做出明智的决定。解决方案"
Web应用程序项目和网站之间的主要区别(对我而言)是事物的编译方式。在网站中,每个页面的代码隐藏都被编译到一个单独的库中,而在Web应用程序中,所有代码隐藏都被编译到一个库中。
两者都有优点和缺点,这确实取决于。这通常也是一个见解的问题。
回答
在这里也回答了,所以投票给答案,而不是这个。不要给我信用
There are two types of web applications in ASP.NET: The Web Site and Web Application Project. The difference between the two are discussed here: Difference between web site and web applications in Visual Studio 2005 Convert to Website allows you to convert a Web Application Project to a Web Site. Visual Studio 2003 used the Web Application Project style, but initially VS2005 only supported web sites. VS2005 SP1 brought back Web Applications. If you don't want to convert your project to a web site, apply SP1 if you're using VS2005. VS2008 can support either.