I’m a really beginner so my question may be appear ridiculous.. But, i wonder how the files .aspx.designer.cs works..
It’s the first time i work with a solution containing files .aspx.designer.cs for each pages. So i understand it’s declaration of controls used in the .aspx for code-behind..
Here is my questions:
Why sometimes solutions doen’t have .aspx.designer.cs files? (is the files hidden or doesn’t exists?)
I often have problems with this files, they don’t Automatically recreate declarations of controls when i add some in the .aspx code, what am i doing wrong?
The
.aspx.designer.xxfiles are the bridge for the ASP.NET webforms code-behind files and the .aspx markup files. Any server control existing on the ,aspx markup page is represented here. Most important are the name and type of the server control.This, in part, allows Visual Studio to give the user IntelliSense in the code-behind page for server controls created at design-time.
How they work: Visual Studio will generate, or keep in sync, a
protectedmember in the .designer file when you add/remove a server control from the designer.Notice that .designer files create a
partial class. This provides the linkage to the code-behind file. That’s how Intellisense gets the hook between the .aspx and the code-behind.You can regenerate your designer file: web.archive.org for undermyhat.org