ASP. Net controls are very important for the ASP.Net framework. It is a .Net class that runs on the server and provides some of its elements to the browser. ASP.Net's framework has more than 70 controls that allow it to perform everything from displaying a list of records in a database to changing the format of an advertisement. Here is a brief description of the controls included in the ASP.Net framework.

ASP.Net controls a brief description (Overview of ASP.NET Controls)

The ASP.Net framework (version 2.0) has more than 70 controls. They can be divided into the following eight categories:

Standard Controls: - With the help of these, the elements of the form such as buttons, input fields, and labels work.

Validation Controls: - This allows the data to be validated or checked before presenting it to the server. For example, you use the RequiredFieldValidator control to check whether a user has entered a value in the field.

Rich Controls: - It controls the calendar, file upload buttons, banner ads, and multi-step wizard controls.

Data Controls: - With the help of these, work is done on the data of the database. For example, you can use them to add records to the database and to show a list of database records.

Navigation Controls: - These depict common navigation elements such as menus, T-views, and braid-crumb trails, etc.

Login controls: - With their help, functions like displaying login, changing the password, and registering forms are done.

Web Part Controls: - They are used to create personal reason-able portal applications.

HTML Controls: - These convert HTML tags into server control.

For example, to display the text input field on a page, a text box control can declare it like this:

<asp: Textbox id = “textBox1”  runat  = “Server” />{codeBox}

The declaration of this control looks like the declaration of the HTML tag. Remember, unlike the HTML tag, the control is a .Net class that is executed on the server and not in the web browser.

When the text box is given to the control browser, it consists of the following components: -

<input name= “Text Box1” type= “text” id= “TextBox1” />{codeBox}

The first part of the control declaration points to the namespace of the asp control. All standard ASP.Net controls are located in the System. Web. UI.Web controls namespace. Then further, the name of the Controller to be declared. In this case, the text box control is being declared.

This declaration also includes ID attributes. You use this ID to refer to the page control with your code. Which points to the control in your code. Each control must have a completely different ID.

Note: - You should always give an ID to each control even if you do not need to create a program for it. If you do not do this, some features of ASP.Net such as data-binding will not work.

This declaration also includes the run at = "server" attribute. This attribute causes the tag to be server-side controlled. If you do not pay attention to the inclusion of this attribute, this text box will not be executed in the browser and the browser also will not pay attention to this tag.

Forward slash (/) is used to end the tag. An example of this is as follows -

</ asp: TextBox>. If you wish, you can declare the text box control as follows:

<input name = “TextBox1”  type=“type” id=”TextBox1”></asp: textbox>

In this case, the slash is not at the beginning of the tag but at the end.

HTML controls using (Using HTML Controls)

HTML controls are declared differently than standard ASP.Net controls. In the ASP.Net framework, you can take any HTML tag and add run at = "Server" attribute with this tag. It converts special HTML tags to the ASP.Net control of the server-side.

For example, the following list has a <span> tag that has been changed in the ASP.Net control:

<%@ Page Language=”VB”%

<!DOCTYPE html PUBLIC” //W3C//DTD XHTML 1.0 Transitional//EN”>

<script runat=”server”>


<html xmlns= “html://”>

<head runat= “server>

<title>Untitled Page</title>



<span runat= “server”>


<form id= “form1” runat= “server”>







Note that the <spam> tag in the list looks like a simple HTML tag except that the run at = "server" attribute has been added to it. Because the <span> tag is a server-side HTML control, you can write programs for it. The <span> tag in the list is in the page-load () method, given the current date and time. HTML controls are included in ASP.Net's framework to make it easier to change.


I am an engineer by profession but being a blogger is my old day's dream to create my site for those who are more curious about my birthplace than I am coming from (India). the current city lives in Navi Mumbai, India

Post a Comment


Previous Post Next Post

نموذج الاتصال