By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,490 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,490 IT Pros & Developers. It's quick & easy.

diffrence between Asp:Textbox vs input text

P: 1
Please Tell Me A Difference Between
Asp:Textbox vs input text
1 Week Ago #1
Share this Question
Share on Google+
2 Replies


P: 17
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.
Expand|Select|Wrap|Line Numbers
  1. Example:
  2. <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.
Expand|Select|Wrap|Line Numbers
  1. Example:
  2. <asp:TextBox Id="txtName" runat="server">
  3.  </asp:TextBox>
3 Days Ago #2

P: 3
Forget about server side controls in ASP.NET MVC. Everything containing runat="server" is a big NO in ASP.NET MVC. Won't work in Razor anyways. There are no pros and cons. Server side controls should never be used so there's nothing to compare. Simply use HTML helpers such as Html.EditorFor and Html.TextBoxFor.
2 Hours Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.