HTML controls Vs WebControls - ASP.net
Can anyone give me the difference in using a webcontrol and a HTML contol with runat=server tag.
Thanks in advance.
Most Web forms are built from Web controls, but ASP.NET supports a second type of server control called HTML controls. HTML controls are instances of classes defined in the FCL's System.Web.UI.HtmlControls namespace. They're declared by adding RunAt="server" (or, if you'd prefer, runat="server"; capitalization doesn't matter in HTML) attributes to ordinary HTML tags. For example, the statement
<input type="text" />
<input type="text" runat="server" />
declares an HTML control-specifically, an instance of System.Web.UI.HtmlControls.HtmlInputText. At run time, ASP.NET sees the runat="server" attribute and creates an HtmlInputText object. The HtmlInputText object, in turn, emits an <input type="text"> tag that's ultimately returned to the browser.
Without realizing it, you used an HTML control in Calc.aspx. The line
<form name="_ctrl0" method="post" action="calc.aspx" id="_ctrl0">
Re: HTML controls Vs WebControls - ASP.net
Ok friend, I will explain at length.
HTML controls are a duplicates of ASP. Let me explain again....
ASP.NET is a new technology. Its million years ahead than asp.
HTML controls are duplicates of old HTML controls. In case you would like
to convert your design to asp.net, you just have to add "runat" attribute to it
and change the page to aspx.
While WebControls are a revolution. You can place all the HTML controls as you
were placing in dreamweaver. The page shows that WebControls are placed,
but in fact the controls are generated only on server.
all html controls are been replaced with web controls and many are added.
for more details visit here www.asp.net, and have look at tutorials.http://forums.techarena.in/images/sm...thumbs_up2.gif
|Tags: aspnet, controls, html, webcontrols|
|Thread Tools||Search this Thread|
|Similar Threads for: "HTML controls Vs WebControls - ASP.net"|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Parental controls for Mac OS X||quoip||Operating Systems||14||11-11-2010 11:01 PM|
|what controls a mouse?||celafox||Off Topic Chat||2||23-09-2010 01:15 PM|
|Controls in Silverlight 4||Dewei||Windows Software||4||05-08-2010 12:21 AM|
|How to define HTML Validator and services provided by HTML Validator||Aldous||Software Development||3||22-09-2009 01:12 PM|
|How do I get the HTML code to display as HTML code?||NAYASA||Software Development||3||26-12-2008 01:35 PM|