ASP.NET Web Forms may be an old technology, but they aren't quite dead just yet. Alot of websites still rely on the now mature framework, including this blog. But because it is on the older side, it doesn't typically get much attention in the newer IDE's when it comes to features and user experience.
By default when I installed Visual Studio 2022 on my latest laptop, the Asus Zenbook S13, I could not add any new .aspx pages into the project. Everything compiled normally and intellisense still worked as expected, but the default templates for web form pages and master pages didn't seem to exist anywhere.
If you are working on an older ASP.NET Web Forms project and you can't quite seem to be able to add any new .aspx pages into your project, then odds are you didn't quite install your IDE correctly. But, you can fix that pretty easily through the Visual Studio 2022 installer/modifier.
Get started
After you download the installer, you can run the .exe and you will be taken to the following screen:
Source: Visual Studio
You won't need to reinstall Visual Studio, but you will be able to modify your current installation. After you click on the "Modify" button you will see a list of all available features that you can install/uninstall in your IDE:
Source: Visual Studio
Once you select the .NET Framework project and item templates checkbox and run the modifier, you will see all Web Form related files in your Visual Studio 2022 instance.
Source: Visual Studio
You will also see the related files for ASP.NET MVC applications and Web API as well. A relatively easy fix, but definitely can be frustrating if you are working on older projects and assume that you have a broken IDE, much like I did.
Walter Guevara is a Computer Scientist, software engineer, startup founder and previous mentor for a coding bootcamp. He has been creating software for the past 20 years.
Last updated on:
Have a question on this article?
You can leave me a question on this particular article (or any other really).
Ask a question