Using Controls from the Toolbox
There are two ways to use custom controls that you’ve written. One is to add a Reference to the Solution Explorer, and the other is to add custom controls to the Toolbox.
Add a Control Reference
I’ll use a custom control first by adding a Reference in the Solution Explorer, as shown in Figure 13.1. Start by right-clicking on the References item in the Solution Explorer and choosing Add Reference. Then, I’ll add the appropriate using/import statement (depending on whether you are using C# or VB) to the source code and declare and use the controls as shown in Listing 13.2.
Figure 13.1. You can add a Reference to the Solution Explorer to enable you to easily use a custom class.
Listing 13.2 shows code that is ...
Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.