Chapter 5. Developing a Simple Custom Control


In Chapter 4, " User Controls: From Page to Control," we described declaratively authored user controls that are deployed as text files (.ascx and optional code-behind files). In this chapter, we will describe controls that are authored in code and deployed in the form of compiled class libraries. To differentiate between the two control authoring models, we will use the term custom control when referring to a control that is authored as a managed class and compiled before deployment.

You can develop custom controls by using any code editor and the .NET Framework SDK. In this chapter, we will describe the essential steps for authoring a custom control and show you how to enable design-time features that give your control a professional look and feel when it is used in a designer such as Visual Studio .NET. We will also show you how to compile a custom control using command-line tools that ship with the .NET Framework SDK. In addition, we'll describe how to debug a server control using command-line tools and using Visual Studio .NET. Because this chapter focuses on programming, we will not get into the details of authoring a server control in Visual Studio .NET. You can see those details in the topic "Walkthrough: Creating a Web Custom Control" in the .NET Framework SDK or MSDN documentation.



Developing Microsoft ASP. NET Server Controls and Components
Developing Microsoft ASP.NET Server Controls and Components (Pro-Developer)
ISBN: 0735615829
EAN: 2147483647
Year: 2005
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net