Registering controls globally in the web.config file


show more Registering controls globally in the web.config file provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Registering controls globally in the web.config file

For controls that you are going to use in many pages throughout your website, it's useful to be able to register the control globally, so that you don't have to use the register declaration at the top of every page. In order to follow along with this demonstration, you must have already created a file called header.ascx in the Controls folder under the Website Root. Open the file web.config from your Website Root folder. This is the file that configures your entire website. It has a Pages element, which I have already scrolled to at about line 67. Within the Pages element, there is a Controls element and then for each custom control that you want to use in your website globally, you put in an Add element as a child of controls.

I am going to move the cursor right before the End tag of Controls, press Enter, move up a line, and then tab in, and then I'll place the New Add tag right below the existing ones. I'll type in a less than character and select add and then I'...

Registering controls globally in the web.config file
Video duration: 3m 53s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Registering controls globally in the web.config file provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training

Subjects:
Developer Web
Software:
ASP.NET
Author:
please wait ...