Difference between HTML control and Web Server control

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值