Home > Articles


  • Print
  • + Share This
This chapter is from the book

Chapter 3:Controls

Terms you'll need to understand:

  • Cascading Style Sheets
  • Client-side event handling
  • HTML controls
  • HTML server controls
  • Server-side event handling
  • Validation controls
  • Web server controls

Techniques you'll need to master:

  • Knowing how to use the common HTML and Web forms controls available in the Visual Studio .NET toolbox
  • Understanding how to handle events for Web forms controls and getting comfortable with client-side and server-side event handling techniques
  • Understanding how to create controls dynamically
  • Working thoroughly with validation Web server controls and answering questions that ask you to choose the most appropriate validation control for a given scenario
  • Knowing how to create and apply Cascading Style Sheets for consistent formatting of Web pages

Controls are the building blocks of a GUI. In this chapter, you'll work with HTML controls, HTML server controls, Web server controls, and validation controls to create the user interface for a Web application. You will also learn about user controls, composite controls, and custom controls, which enable you to extend the existing controls to achieve custom functionality.

HTML Controls

HTML controls represent common HTML elements and are available through the HTML tab of the Visual Studio .NET toolbox. You can drag these controls to a Web form and set their properties in the Properties window. An HTML control, such as Text Field or Label, is converted to its appropriate HTML equivalent, such as the <INPUT> and <DIV> element, respectively, in the source code of the ASPX file. All the HTML controls are automatically placed inside an HTML <FORM> element.

HTML controls are only of little use in ASP.NET programs because they can't be accessed from the server-side code. ASP.NET provides two other sets of controls that are much better suited for server-side programming: HTML server controls and Web server controls.

  • + Share This
  • 🔖 Save To Your Account