aspx.designer.cs how does it work?

The .aspx.designer.xx files 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 protected member in the .designer file when you add/remove a server control from the designer.

  protected global::System.Web.UI.WebControls.DropDownList DropDownList1;

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

Leave a Comment