It depends on which ASP.NET you mean…
For example, in terms of Blazor:
As of .NET Core 3.0 Preview 4 SDK (3.0.100-preview4-011223) it is noted:
- Rename all _ViewImports.cshtml files to _Imports.razor.
- Rename all remaining .cshtml files to .razor.
So if you are building a Blazor Web App using .NET Core 3.0 Preview 4 and later, you should be using .razor instead of .cshtml.
Source: https://devblogs.microsoft.com/aspnet/blazor-now-in-official-preview/