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)
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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?
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0