What is the purpose of providing HTML controls with VS.net?
Why would someone choose to use HTML controls over .net web server controls?
What is the purpose of providing HTML controls with VS.net? Why would someone choose
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ASP.NET Server Controls generally are more polished and abstracted, behaving more like controls in the Windows Forms API. HTML controls are more bare-bones, with less abstractions to store state and a more raw interface to adding attributes.
HTML controls can be included in a page as just plain text tags that the ASP.NET processor outputs exactly as they are written. They can also be set to be processed by ASP.NET by adding a
runat="server"attribute to any HTML tag. Once you add this attribute and give an HTML control an ID, you can access it programmatically.Using one or the other is really a matter of style or preference. The key thing to keep in mind is that you shouldn’t use one or the other exclusively. I’ve worked at places where developers say “always try to use the ASP.NET controls” and other places where developers say “avoid ASP.NET controls whenever possible”. There are no really strong arguments, at least that I can think of, that give definite examples of why one or the other should be used exclusively.