HeaderControl

As a quick entry into developing UserControls, a custom header control with two properties should suffice to get the blood rushing. The header control will be developed to allow for interaction with the ASP controls on the page. Later, a different approach will be taken, showing that there is more than one way to accomplish a task.

The header control, shown in Figure 4.3.1, will be developed using the following ASP WebControls:

  • asp:table Similar to the HTML table tag

  • asp:image Similar to the HTML img tag

  • asp:label Generates an HTML span

Figure 4.3.1. The header control.

One of the benefits of using asp:* controls is their ability to ...

Get C# and the .NET Framework: The C++ Perspective 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.