简体   繁体   English

asp.net和asp.net核心项目是否有可能在同一解决方案中“发挥出色”?

[英]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.

相关问题 同一解决方案中两个ASP.NET Core项目之间的通信 - Communication between two ASP.NET Core projects in the same solution 在同一个解决方案中结合 ASP.NET 和 ASP.NET 核心 - Combine ASP.NET and ASP.NET core in the same solution 在 asp.net 核心 3 中创建漂亮的 url - Create nice url in asp.net core 3 ASP.NET Core解决方案是否可以包含具有不同目标框架的项目? - Is it possible to have an ASP.NET Core solution contain projects with different target frameworks? 是否可以将 ASP.NET ASPX 解决方案迁移到 ASP.NET Core 2.0? - Is it at all possible to migrate ASP.NET ASPX solution to ASP.NET Core 2.0? 在ASP.Net Core 2中使用标签助手生成一个不错的URL - Generating a nice URL with tag helpers in ASP.Net Core 2 是否可以在同一个 ASP.NET 运行时容器中安装不同的 ASP.NET Core 框架? - Is it possible to install different ASP.NET Core Frameworks in the same ASP.NET runtime container? 如何在相同解决方案的asp.net核心Razor页面中使用单独的asp.net核心web api - How to Use separate asp.net core web api in asp.net core Razor Page in Same Solution 是否可以在ASP.NET Core中续订会话? - Is it possible to renew sessions in ASP.NET Core? 在asp.net核心解决方案中的项目之间共享视图(.cshtml文件) - Share views (.cshtml files) between projects in asp.net core solution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM