If we create an ASP.NET Web Application in Visual Studio we can see that each and every .aspx file will have an associated auto generated .aspx.designer.cs file. But in case of an ASP.NET WebSite each aspx file has only a codebehind .aspx.cs file only.
My question is why ASP.NET Website does not have an auto generated designer .cs file?
What is the purpose of the auto generated designer file in case of the Web Application project? (I believe no one is touching that designer file)
why ASP.NET Website does not have an auto generated designer .cs file?
Because the code is compiled by the VisualStudio on the fly. Each page is compiled into a separate dll.
What is the purpose of the auto generated designer file in case of the Web Application project?
The designer file is created as a partial class which works as a bridge between aspx and aspx.cs file, which also provides IntelliSense support. No one touches the designer file because visual studio updated it automatically when any changes are made to the aspx file.
Below are references which will provide you more information:
ASP.NET Web Site or ASP.NET Web Application?
aspx.designer.cs how does it work?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With