Chapter 11: Creating Custom Web Controls

Chapter 11

Creating Custom Web Controls

About This Chapter

Custom controls extend the tools available to Web developers. Using custom controls, you can encapsulate key aspects of the visual interface and program logic that you want to reuse throughout your application, or throughout your organization. Microsoft Visual Studio .NET provides three types of custom control for use on Web forms. In this chapter, you ll learn how to develop and use each of these controls:

  • Web user controls

    These combine existing server and HTML controls by using the Visual Studio .NET Designer to create functional units that encapsulate some aspect of the user interface. User controls reside in content files, which must be included in the project in which the controls are used.

  • Composite custom controls

    These create new controls from existing server and HTML controls. Although similar to user controls, composite controls are created in code rather than visually, and therefore they can be compiled into an assembly (.dll), which can be shared between multiple applications and used from the Toolbox in Visual Studio .NET.

  • Rendered custom controls

    These create entirely new controls by rendering HTML directly rather than using composition. These controls are compiled and can be used from the Toolbox, just like composite controls, but you must write extra code to handle tasks that are performed automatically in composite controls.

Before You Begin

To complete this chapter, you must:

  • Be familiar with the life cycle of Web applications.

  • Understand object-oriented programming techniques, namespaces, and state information issues, as discussed in Chapter 3, Working with Web Objects.

  • Have experience developing Web applications with the standard server and HTML controls.



MCAD(s)MCSD Self-Paced Training Kit(c) Developing Web Applications With Microsoft Visual Basic. Net and Microsoft V[.  .. ]0-315
MCAD(s)MCSD Self-Paced Training Kit(c) Developing Web Applications With Microsoft Visual Basic. Net and Microsoft V[. .. ]0-315
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 118

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