Home » ASP.NET Basics » 06 - ASP.NET 2.0 Server Controls
6

More about Server Controls

Detailed discussion ons erver controls

ASP.NET 2.0 provides a wide range of server controls. We have already seen the navigation controls when we created the site navigation system for our project. All the server controls are available from the Toolbox. As we have seen in chapter 2, the controls in the Toolbox are categorized into different sections.

Adding a control to our page is a simple task. We can drag the control from the toolbox and drop it on the page. We can also double click on the control in the toolbox to add it to the page.

Each control has its properties and events. Properties are used to set the looks and behavior of the control. We can set the property of a control while designing the page. To do this, simply click on the control on the page to select it, open the properties window and set the required property by clicking in the column next to it. Properties can also be set programmatically. For example, we can change the text in a textbox when the user clicks on a button.

Events are used for specifying actions when the user interacts with a control. For example, the `Click' event of a button control is used to program the actions that will take place when the user clicks that button.