Re: HTML control Vs Web form control
- From: "Kevin Spencer" <unclechutney@xxxxxxxxxxxx>
- Date: Mon, 5 Nov 2007 06:21:51 -0500
As Eliyahu said, HtmlControls are more lightweight, but it is important to
understand what the differences are in order to know what you need to use.
All HtmlControls are derived from System.Web.UI.HtmlControls.HtmlControl,
and all WebControls are derived from System.Web.UI.WebControls.WebControl.
Give the following MSDN references to these 2 base classes a read, and you
should be well-informed:
http://msdn2.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlcontrol.aspx
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.aspx
--
HTH,
Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@xxxxxxxxxxxx> wrote in
message news:egbeYo4HIHA.4880@xxxxxxxxxxxxxxxxxxxxxxx
Html controls are lighter. One of typical scenarios where you may want to
use html controls is when you have an html prototype of your page and you
need to program it in asp.net. Then it is easier just to add runat=server
to html controls.
Web controls offer common set of server-side members that can make your
code cleaner and more readable.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bhuwan Bhaskar" <kxxx@xxxxxxxxx> wrote in message
news:uxe%23IJ4HIHA.4560@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am new to asp.net. I want to know that, HTML and Web form control can
work in same way example, using "runat = Server" attribute, html control
can also executed at server, then what is the use of HTML control and is
there is any specific condition when we use only HTML control or web form
control.
Thanks and regards,
Bhuwan
.
- References:
- HTML control Vs Web form control
- From: Bhuwan Bhaskar
- Re: HTML control Vs Web form control
- From: Eliyahu Goldin
- HTML control Vs Web form control
- Prev by Date: Re: ASP.NET 2.0 menu question
- Next by Date: Re: Event syntax problem to call up the selected event of an ods
- Previous by thread: Re: HTML control Vs Web form control
- Next by thread: ASP.NET 2.0 menu question
- Index(es):
Relevant Pages
|