asp.net - 创建基于 ASP.NET WebForm .NET 6 VS 2022 的 ASPX 页面而不是 razor

标签 asp.net .net-6.0 visual-studio-2022

我们如何创建基于 ASP.NET WebForm .NET 6 VS 2022 的 ASPX 页面 (.aspx),而不是 razor (.cshtml)?

最佳答案

你不能。

ASPX 来自 .NET Framework 的 WebForms (System.Web) 部分。此区域尚未移植到 .NET Core 或较新版本的 .NET (5+),并且没有计划这样做。

对于基于组件的 Web 开发框架,Blazor 是新的 Microsoft 平台。有迁移指南here这可以作为一个起点,但迁移将是一个复杂的过程。

关于asp.net - 创建基于 ASP.NET WebForm .NET 6 VS 2022 的 ASPX 页面而不是 razor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71205948/

相关文章:

asp.net - 在asp.net中访问网站根文件夹之外的文件夹

c# - 为什么 GetShortestDayName 返回的名称比预期的要短?

visual-studio-2022 - 从开发人员 Powershell 运行 dotnet 命令时,Visual Studio 2022 打开 "How do you want to open this file"

asp.net-mvc-4 - 如何在 VS 2022 中的页面 View (cshtml) 中显示 "go to controller"?

c++ - 使用 C++ AI 引擎和 ASP.NET C# 页面的纸牌游戏

asp.net - 从 SSIS 调用 Web API 页面?

javascript - 有没有一种优雅的方法来检测移动浏览器?

c# - 如何在.NET 6 Program.cs类中获取ILoggerFactory实例

.net - Visual Studio for Mac 2022 不使用预期的 .NET6 SDK

c# - 由于 UI,Visual Studio 2022 无法在函数头上设置断点