October 2010
Intermediate to advanced
1920 pages
73h 55m
English
As an alternative to registering a User control in each page in which you need to use it by using the <%@ Register %> directive, you can register a User control once for an entire application. You can register a User control in an application’s web configuration file.
For example, the web configuration file in Listing 7.3 registers the RandomImage control for the application.
Listing 7.3. Web.Config

After you register a User control in the web configuration file, you can simply declare the User control in any page. For example, the page in Listing 7.4 contains an instance of the RandomImage ...
Read now
Unlock full access