Search:
Namespaces
Discussions
.NET v1.1
Feedback
WebControls Vs HTMLControls
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngcontrolsvb' list
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Ramya Parthasarathy (VIP)
-- This message, which was originally sent to "aspngbeta", has been moved to "aspngcontrolsvb" mailing list by the List Master --
Hi,
I am trying to decide between using WebControls and HTMLControls. Some
of the questions I am having are --
1) Why do we have the two families of controls?
2) Are there any scenarios where only of them can be used.
3) If both provide the same functionalities, which control family if
preferred?
Any other information to aid me in choosing between the two will be
greatly appreciated.
Thanks,
Ramya
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
Reply to this message...
Stuart C. Salsbury
The subject of HTML controls vs. Web controls can be very complicated when
you are developing controls. When you are trying to decide which type to
use on a given page, you might try the strategy:
1) find a web control that seems to do what you need to do and
choo-choo-choo choose it;
2) if #1 fails, use an HTML control.
Assuming that you are developing controls...and that you are trying to
decide from which family to derive a custom control.... I don't think I've
really internalized all of the consequences of the choice between
HTMLControls vs. WebControls. However, I'll share what I know and what I
suspect.
HTMLControls are basically mapped directly to the HTML elements and any
other element that has runat="server". We all should know basically what
this means if we're trying to develop controls. beta1 docs are fairly clear
about what the differences are, unless you step into control development,
where I think the docs are actually a bit misleading.
So to try to answer your specific questions, assuming that you're developing
controls:
>> 1) Why do we have the two families of controls?
If you are developing controls, you'll need to know this better than I have
time to describe, but the short answer is:
One set (HTML) are the more flexible and less feature-filled controls that
let you use you're own recipe "from scratch".
The other set (Web) are more feature-filled. They provide a programming
model that is more conducive to visual design environments similar to VB and
some of the Java gui design tools - they are (in theory) drag-and-droppable
and rather dynamic before you even write any VB code for them.
>> 2) Are there any scenarios where only of them can be used.
From the control author's perspective, there *may* be things that you can't
do with Web controls that you can't do with HTML controls, but I doubt it.
I think all of the core System.Web.UI.
Control
methods (CreateChildControls,
Render, etc.) are overrideable in Web controls. Thus, your are free to
reinvent new wheels for your WebControl-derived controls. However, in doing
so, you begin to undo the abstract programming model that they are trying to
provide with web controls. There should be a good reason for doing so.
Otherwise, you should probably use an HTML control. HTML controls make it
easier to adapt classic ASP and to finely tune the behavior and rendering of
your control.
>> 3) If both provide the same functionalities, which control family if
preferred?
This is not so easily answered in general. Facts and circumstances rule
this decision
I hope this helps,
Stuart Salsbury
Quantitative Economics and Statistics
Ernst & Young LLP
-----Original Message-----
From: Ramya Parthasarathy [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, May 31, 2001 12:43 PM
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] WebControls Vs HTMLControls
-- This message, which was originally sent to "aspngbeta", has been moved to
"aspngcontrolsvb" mailing list by the List Master --
Hi,
I am trying to decide between using WebControls and HTMLControls. Some
of the questions I am having are --
1) Why do we have the two families of controls?
2) Are there any scenarios where only of them can be used.
3) If both provide the same functionalities, which control family if
preferred?
Any other information to aid me in choosing between the two will be
greatly appreciated.
Thanks,
Ramya
Reply to this message...
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com