Having been a web site designer for many years, I'm moving across to web applications in Visual Studio. Many projects currently involve migrating web sites to web applications.
Following migration, within VS, for each of my ASPX web forms files, I get the usual code-behind file (*.cs
as before), and also now a *.designer.cs
file.
Every .designer file contains an empty partial class with a warning that the file was generated by a tool.
I know that within winforms, the designer files hold the data regarding the form control layouts, but in web applications, the ASPX file already has this logic. So why are designer files generated for web applications, and what is their use?
I know that within winforms, the designer files hold the data regarding the form control layouts, but in web applications, the ASPX file already has this logic. So why are designer files generated for web applications, and what is their use?
But your this assumption is wrong ->the ASPX file already has this logic
Aspx file do not have any logic atleast not in programmed format. So you create a intermediate file which define all the controls and also provide intellisence for those control.
See this link for more aspx.designer.cs how does it work?