|
MCAD Developing and Implementing Web Applications with Visual C#. NET and Visual Studio. NET (Exam [... ]am 2) Authors: Kalani A., Kalani P. Published year: 2005 Pages: 35-38/191 |
Need to Know More?
|
Chapter 3. ControlsTerms you'll need to understand:
Techniques you'll need to master:
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 ControlsHTML 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. |
HTML Server ControlsHTML server controls are similar to HTML controls with the added feature of server-side availability. You can convert any HTML control to run as an HTML server control by adding a runat ="server" attribute to its declaration. You can accomplish the same task visually by right-clicking an HTML control and selecting Run As Server Control from the shortcut menu. |
|
MCAD Developing and Implementing Web Applications with Visual C#. NET and Visual Studio. NET (Exam [... ]am 2) Authors: Kalani A., Kalani P. Published year: 2005 Pages: 35-38/191 |