The difference between Asp:Textbox and input text
Asp:Textbox is ASP.Net Controls and input text is HTML Controls so the main differnce between HTML Controls and ASP.Net Controls.
HTML Controls
HTML control runs at client side.
You can run HTML controls at server side by adding attribute runat=”server”.
HTML controls are client side controls, so it does not provide STATE management.
HTML control does not require rendering.
As HTML controls runs on client side, execution is fast.
HTML controls do not have any separate class for its controls.
HTML controls does not support Object Oriented paradigm.
- Example:
-
<input type="text" ID="txtName">
ASP.Net Controls
ASP.Net controls run at server side.
You can not run ASP.Net Controls on client side as these controls have this attribute runat=”server” by default.
ASP.Net Controls are Server side controls, provides STATE management.
ASP.Net controls require rendering.
As ASP.Net controls run on server side, execution is slow.
ASP.Net controls have separate class for its each control.
With ASP.Net controls, you have full support of Object oriented paradigm.
- Example:
-
<asp:TextBox Id="txtName" runat="server">
-
</asp:TextBox>