[英]Is it possible for asp.net and asp.net core projects to “play nice” in the same solution?
I am wondering if an asp.net project
and an asp.net core project
can "play nice" together in the same visual studio solution. 我想知道一个asp.net project
和一个asp.net core project
可以在相同的Visual Studio解决方案中“一起玩”。 (.sln) (.sln)
I am new to both frameworks and am having trouble researching the compatibility of the two due to the whole naming ambiguity... 我对这两个框架都是陌生的,由于整个命名的歧义,我在研究两者的兼容性时遇到了麻烦。
When I start a new asp.net core project we have the home controller with a few views that are .cshtml 当我开始一个新的asp.net核心项目时,我们的主控制器带有一些.cshtml视图
Would I be able to add and leverage pre-existing .aspx files that are from another project? 我是否可以添加和利用来自另一个项目的预先存在的.aspx文件? Or is it a fool's task and converting them a necessity? 还是傻瓜的任务并将其转换为必需品?
The simple answer is no. 简单回答是不。 If you are new to both frameworks, forget about web forms, just go for asp.net core. 如果您对这两个框架都不熟悉,请不用担心Web表单,只需使用asp.net core。 If you need to get help, and want to google the answer, just search the last year, or from Jan 2016. 如果您需要帮助,并且想要找到答案,只需搜索去年或从2016年1月开始。
Converting aspx files is easy. 转换aspx文件很容易。 Copy the HTML output to the View and change it with Razor. 将HTML输出复制到视图,并使用Razor对其进行更改。 Then take the existing code and put it in two methods on the controller, one for the page view, and one for taking the response action. 然后将现有代码放入控制器中的两种方法中,一种用于页面视图,另一种用于执行响应操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.