Create ASP.NET WebForm .NET 6 VS 2022 based ASPX pages not razor

Viewed 823

How can we create ASP.NET WebForm .NET 6 VS 2022 based ASPX pages (.aspx), not razor (.cshtml)?

2 Answers

You can't.

ASPX is from the WebForms (System.Web) part of the .NET Framework. This area was not ported to .NET Core, or to newer versions of .NET (5+), and there are no plans to do so.

For a component-based web development framework, Blazor is the new Microsoft platform. There is a migration guide here which can serve as a starting point, but migrating will be an involved process.

There is no way you can create WebForm project (with .aspx) in .NET 6. You can use VS 2022 to create a WebForm project if you install .NET Framework 4.8.

Related