Showing posts with label cons. Show all posts
Showing posts with label cons. Show all posts

Saturday, March 24, 2012

HTML Elements vs. WebControls?

What are the pros and cons to using each?

For example, why should I use the asp.net textbox instead of the HTML element textbox?

This has been confusing me for awhile now.

Thanks for any input.

JamesHTML server controls
==============
HTML elements exposed to the server so you can program them. HTML server controls expose an object model that maps very closely to the HTML elements that they render.

Web server controls
=============
Controls with more built-in features than HTML server controls. Web server controls include not only form-type controls such as buttons and text boxes, but also special-purpose controls such as a calendar. Web server controls are more abstract than HTML server controls in that their object model does not necessarily reflect HTML syntax
Web Server controls require more overhead... if you are concern about performance then I woud go with Html server controls. (Not a huge difference though...)

Thursday, March 22, 2012

HTML controls vs asp controls

what are the pros/cons of using html controls vs asp controls..like a html text box vs asp text box?

Hi,

Brodly, there are four types of server controls in ASP.NET.

ASP.NET HTML controls

ASP.NET WEb controls

Validation controls

User controls

ASP.NET HTML controls

ASP.NET HTML controls are server-side replicas of the standard HTML tags and are executed by aspnet_isapi.dll. The HTML tags are covverted into HTML controls by using attributes such as ID and RUNAT. After an HTML tag is converted into an HTML control, the tag becomes a server-side object with properties, methods, collections and events.

It is important to remember that HTML controls are included in ASP.NET for backward compatibility. You will use HTML controls when you need to migrate an existing ASP application to ASP.NET platform. To use an HTML control, you need to import the System.Web.UI.HtmlControls namespace to a web form. You can also add these controls by using the HTML tab of the tool box.