What are server side and client side controls

What are server side and client side controls



Views: 1108 | Community Opinion: 1

Tags..  Asp.NET  Asp.Net Controls

Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 

By default all html controls are client side controls. they can not be accessed through code behind file. They can be accessed by only JavaScript at client side. To make these elements programmable in ASP.Net Web Form, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control. The id attribute is added to identify the server control. The id reference can be used to manipulate the server control at run time.

There are three kinds of Asp.NET server controls:

* HTML Server Controls - Traditional HTML tags
* Web Server Controls - New ASP.NET tags
* Validation Server Controls - For input validation





All HTML server controls must be within a tag with the runat="server" attribute. The runat="server" attribute indicates that the form should be processed on the server. It also indicates that the enclosed controls can be accessed by server scripts.

Web server controls are also created on the server and they require a runat="server" attribute to work. However, Web server controls do not necessarily map to any existing HTML elements and they may represent more complex elements.






Register or Login to Post Your Opinion