October 2010
Intermediate to advanced
1920 pages
73h 55m
English
You can expose custom events from a User control. After you expose the event, you can handle the event in the page that contains the User control.
Exposing events is useful when you need to pass information up to the containing page. Imagine, for example, that you want to create a custom tab strip with a User control. When a user clicks a tab, you want to change the content displayed in the page (see Figure 7.2).
Figure 7.2. Displaying a tab strip with a User control.

The User control in Listing 7.8 contains the code for a simple tab strip.
Listing 7.8. TabStrip.ascx
The tab strip is created with the help ...