Creating ASP.NET 2.0 Controls

Summary

The tasks in this Drill explore various aspects of ASP.NET custom controls, which enable you to define your own controls and supplement ASP.NET’s standard server controls.

Audience

This Drill is for developers who want to be able to create their own controls and use them in their ASP.NET 2.0 applications. These custom controls can be comprised of existing server controls, derived from an existing server control, or created from scratch. It is also for developers who would like to know how to add designer support to their custom control or be able to store its state.

What you'll learn

You will be able to create a user control encapsulating existing server controls, create and customize a control derived from an existing web control, and create a control derived from the CompositeControl class. You’ll also be able to persist your custom control’s information using the new ControlState property and implement designer support in custom controls.

What you need to know

We assume that you’re already familiar with the concepts of programming and you’ve some experience with Visual Studio 2005. For this particular Drill, you’ll also need to be comfortable with Visual C# or Visual Basic syntax and HTML. Although not essential, experience in object-oriented development and server page technology would also be useful.