Visual Studio 2022 has a new designer for Web Forms, the original web application framework that goes back to the first release of .NET.
The IDE, currently available as Preview 2.0, embeds a feature called Web Live Preview into the designer for ASP.NET Web Forms. The name Live Preview, however, does not do it justice as it is also possible to edit the text in the visual designer.
The previous visual designer for web forms offered only a rough idea of what the final page would look like, whereas the new one is actually rendered by a web browser.
There are obvious differences in the new designer based on a quick look at the default ASP.NET web forms application, which shows the menu bar from a template called site.master as well as font sizes and layout that looks like the actual page – though web pages are designed to support many different web browsers and screen sizes, so no preview tells the whole story.
Microsoft senior program manager Sayed Hashimi explained that the new designer's features include rendering live data in data bound controls, two-way navigation so that selecting a control in the designer navigates to that point in the source, live updates when changes are made to CSS files, drag and drop controls from the toolbox, and double-click of controls to generate a default event handler.
Overall it is a big tooling update, even if the capabilities of the underlying framework are unchanged. ASP.NET Web Forms is a more or less frozen technology, being dependent on the old Windows-only .NET Framework rather than the new .NET Core/.NET 5 and higher.
- Windows 10 to hang on for five more years with 21H2 update
- Visual Studio 2022 Preview 2 adds C++ build and debugging in WSL2 distributions
- Microsoft solicits Clippy comeback – later reveals it had already decided to bring back the peppy paperclip
- Microsoft defends intrusive dialog in Visual Studio Code that asks if you really trust the code you've been working on
The last significant update was in April 2018, with the release of .NET Framework 4.7.2, which added support for SameSite cookies and Dependency Injection. Microsoft has a paper on strategies for migrating ASP.Net Web Forms apps, suggesting that developers consider migrating code to Web APIs and/or porting applications to Blazor, a newer framework that supports writing C# code to run in the browser via WebAssembly.
The Web Forms framework was warmly taken up by developers back in 2002, especially by Windows desktop developers who were not accustomed to the stateless nature of the web.
This being the case, why is Microsoft updating the tooling for Web Forms in Visual Studio 2022? That is one thing Hashimi did not tell us; but note that .NET Framework is a component of Windows and therefore supported for as long as the version of Windows it comes with.
"Support for .NET 4.8 follows the Lifecycle Policy of the parent OS," Microsoft says, which means at least until 1 September 2029 (end of support for Windows Server 2019), and in practice later than that since the company will continue to ship .NET Framework with new versions of Windows.
Many Web Form applications are custom business applications where modern features take a back seat to being able to perform the tasks for which they were designed. While it may not make sense to start a new Web Forms application, maintaining existing ones is another matter and this framework, like its companion Windows Forms, is one that refuses to die. ®