Hello
I'm new to ASP.Net so this is probably a **** question but, is there any need to create customer server controls now that you can pre-compile usercontrols into a dll and thus easily share between applications?
This blog post from David Ebb describes how to do it and the restrictions he note don't seem that bad (other than being able to embed resources such as images in the dll). http://blogs.msdn.com/davidebb/archive/2005/10/30/487160.aspx
His article desribes the techniques for ASP.Net 2.0 and he suggests that there will be further improvements in .Net 3.5 in this area. Does anyone know about these?
Cheers
G
Hi,
UserControls, precompiled or not, are reusable groups of pre-existing controls (and relative business logic).
This is fine in most cases.
But there are times when you need a type of control that is not included in the framework. (eg. chart control, graphic checkbox control, gauge control, etc.)
You may create it inheriting and customizing existing ones, or creating it from scratch, fully implementing its html rendering. I know, this are rare situations... but I would never say Custom Controls are no more useful...
=WereWolf=
--
--
Helping someone does not mean giving them what they need, but making them able to get it themselves
--
The Code Golem http://www.codegolem.com/
Hi WereWolf
Thanks for your response. Right ok so, if you want to extend an exiting control, use a control(s) which can't be added to the Toolbox and/or fully control the html rendering then creating Custom Server controls is the way to go?
Otherwise you might as well just create a usercontrol?
Cheers
G
Yes, I would say best practice is to project your solution using UserControls.
When your special needs can not be satisfied by UserControls, then think implementing Custom Controls.
The important thing is analyzing the requisites and choosing UserControl or CustomControl while projecting, not when you are already writing your code
At least, this is how I am used to work.
Hope it helps. Bye!
=WereWolf=
--
--
Helping someone does not mean giving them what they need, but making them able to get it themselves
--
The Code Golem http://www.codegolem.com/