Murach's ASP.NET 2.0 with C# 2005
How to develop custom server controls

This chapter shows you how to create custom server controls that can be used in multiple web applications. As you'll see, they're more powerful than user controls, but also more difficult to develop and maintain.

Chapter 25 How to develop custom server controls
An overview of custom server controls 748
An introduction to custom server controls 748
How custom server controls compare with user controls 750
Three types of custom server controls 752
How to create a rendered control 754
The default class for a custom server control 754
How to override the Render or RenderContents method for a custom control 756
The design of the DaysUntil control 758
The code for the DaysUntil control 758
How to create and test a web control library 762
Step 1: Create a web control library 762
Step 2: Create the custom server controls 762
Step 3: Build the web control library 762
Step 4: Add the library to a web site 764
Step 5: Test the controls 764
Additional programming techniques for custom controls 766
How to use the HtmlTextWriter class to render HTML 766
How to use designer attributes 768
How to raise events in a custom control 770
How to create a superclassed control 772
Hwo to code a superclassed control 772
The design of the CaptionedBox control 772
The code for the CaptionedBox control 774
How to create a composite control 778
How to code a composite control 778
The design of the DateDDL control 780
The code for the DateDDL control 780




Murach's ASP.NET 2.0 with C# 2005

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.