Asp.NET Server Controls

Asp.Net - Using Form

You have noticed that when we create an asp.net page in Visual Studio, a form tag opens right after the body tag. The runat="server" parameter in this form tag indicates that the form will run on the server.

The runat="server" parameter must be written in all controls that will run on the server, not just the form, otherwise that control will not work.

An asp.net page can have only one form with runat="server". That's why VS opens these form tags right after the body. There is no harm in having everything between the form tags.

We can add any other controls we want into this form.

Server controls are similar in appearance to HTML controls, but the codes used to write them are different. For example, while creating a button in HTML, the input tag is used, while in asp.net it is as follows.

  <asp:Button ID="Button1" runat="server" Text="Button" />

All server controls begin with <asp: followed by the type and properties of the control.

The properties of the controls placed on the page can be changed from the code section, or they can be changed using the properties panel.

Commonly used server controls (asp.net objects) are described in the following topics.

What is asp.net server control, what are server controls, examples of server control, how to use server controls

EXERCISES

There are no examples related to this subject.



COMMENTS




Read 880 times.

Online Users: 11536



asp-net-server-controls