Thursday, March 22, 2012

HTML Controls vs. Web Controls

What are the advantages and disadvantages of using HTML Server Controls over
Web Server Controls and vice versa? Is there a clear cut consensus among
ASP.NET developers over which controls to use?

ThanksUse HTML Server controls (HTML control with "runat=server" added) when
migrating non-.NET forms to .NET.
Use Web Forms controls for new UI development that needs server-side
programmatic functionality.
Use HTML controls when no server-side functionality is needed.

"brian" <brian@.discussions.microsoft.com> wrote in message
news:3435A1A5-825B-48A5-8F65-937D2883E223@.microsoft.com...
> What are the advantages and disadvantages of using HTML Server Controls
> over
> Web Server Controls and vice versa? Is there a clear cut consensus among
> ASP.NET developers over which controls to use?
> Thanks
"brian" <brian@.discussions.microsoft.com> wrote in message
news:3435A1A5-825B-48A5-8F65-937D2883E223@.microsoft.com...
> What are the advantages and disadvantages of using HTML Server Controls
over
> Web Server Controls and vice versa? Is there a clear cut consensus among
> ASP.NET developers over which controls to use?

In addition to Scott's post:
- Use HTML Server controls when you want full control over the HTML that is
rendered.
- Some HTML Server controls don't have a Web Server Control equivalent such
as the HtmlInputFile (upload) control
- HTML Server controls are slightly faster than Web controls.
HTML controls are light and simple, while Web Controls are full of extra
functionality.
Here are more details for you:
http://SteveOrr.net/FAQ/3in1.aspx#HTMLvsWeb

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"brian" <brian@.discussions.microsoft.com> wrote in message
news:3435A1A5-825B-48A5-8F65-937D2883E223@.microsoft.com...
> What are the advantages and disadvantages of using HTML Server Controls
> over
> Web Server Controls and vice versa? Is there a clear cut consensus among
> ASP.NET developers over which controls to use?
> Thanks

No comments:

Post a Comment