8
Reply

What is difference between HTML Server control and Asp.net Server Control ?

Vithal Wadje

Vithal Wadje

9y
28.6k
1
Reply

    Difference between HTML control and Web Server control 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. WServer Control Advantages Server controls are easy to use and manage but HTML controls are not. Server control events are handled in the server side whereas HTML control events are handled in the client side browser only . It can maintain data across each requests using view state whereas HTML controls have no such mechanism to store data between user requests. http://net-informations.com/faq/asp/server-control.htm

    https://mycodelines.wordpress.com/2008/12/17/differences-between-html-server-controls-and-aspnet-server-controls/

    HTML controls are the native browser elements, such as buttons, textboxes, tables, etc.There aren't any "HTML server controls" per se, but there are frameworks such as ASP.NET that make it seem as though you can inject server-side logic inside HTML pages by using server-side controls. These pages are not really HTML pages because they are interpretted by a runtime on the server before the HTML is sent to the browser. As a result, they usually have different file extensions (such as .asp or .aspx) so the server knows which files to interpret (the ASP.NET files) and which to send as-is (the HTML).ASP.NET controls are executed on the server, with the resultant HTML sent to the client. ASP.NET controls also emit JavaScript when applicable (such as for client-side validation) to improve performance. A big benefit to ASP.NET is that emits standards-based content to a varied array of browsers so there's no deployment required for end users.As for performance, the best bet is probably to make any files that have no dynamic content plain HTML and make all dynamic pages in ASP.NET.

    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. Both are server controls, but the controls in the WebControls namespace generally has a bit more functionality than the controls in the HtmlControls namespace. Typically they put some data in ViewState to keep track of their state, and they have server side postback events

    asp.net server controls needs rendering. html server controls don't need any rendering process as these are already in html form

    HTML SERVER CONTROLHTML Server controls can be made to interact with Client side scripting. Processing would be done at client as well as server depending on your code.Migration of the ASP project thought not very easy can be done by giving each intrinsic HTML control a runat = server to make it HTML Server side control. The HTML Server Controls have no mechanism of identifying the capabilities of the client browser accessing the current page.ASP.NET SERVER CONTROLASP .NET Server Controls can however detect the target browser's capabilities and render themselves accordingly. No issues for compatibility issues of Browsers i.e page that might be used by both HTML 3.2 and HTML 4.0 browsers code to be written by you.ASP .NET Server Controls have an object model different from the traditional HTML and even provide a set of properties and methods that can change the outlook and behavior of the controls. ASP .NET Server Controls have higher level of abstraction. An output of an ASP .NET server control can be the result of many HTML tags that combine together to produce that control and its events.

    http://extremeexperts.com/net/faq/diffbetweenserverandhtmlcontrols.aspx