Mohammed Ali
Mohammed Ali

Reputation: 1185

HTML controls in ASP.NET Server side or Client side?

Does the HTML controls in ASP.NET works in server side as well as client side? or it is for client side only?

Upvotes: 1

Views: 2072

Answers (1)

Aspirin_xap
Aspirin_xap

Reputation: 218

According to your Answer it Runs At Client side only if dont want to put runat='server' inside the html control tag.
HTML controls

HTML controls are the native browser elements and they are part of HTML language. These are client side controls which is accessible only in the HTML page, so it will improve the performance of the web page. HTML controls on an ASP.NET Web page are not available to the web server.

HTML Server controls

You can add the attribute runat="server" to any HTML control, such cases it will be an HTML server control. These controls map directly to html tags and without runat="server" it cannot access the control in code behind.

Web Server Controls or ASP.NET controls

Web Server Controls are group of controls derived directly from the System.Web.UI.WebControls base class. They are executed on the server side and output HTML sent back to the client browser. These controls are programmable and reusable that can perform function as the ordinary HTML controls. Web Server Controls can detect the target browser's capabilities and render themselves accordingly.

Upvotes: 2

Related Questions