Last post Jun 15, 2009 04:06 PM by dev_2580
May 29, 2009 10:11 AM|dev_2580|LINK
I have a situation and it is starting to get under my skin.
What I have been asked to provide is a "custom list control" that can be reused in all of our Web Projects.
I have never created a custom server control before, and have been doing some research and test projects.
The Problem I now face is that the specifications that I have received to create such a control is not simply an extension of an existing control, but rather a couple of controls together. Let me explain what I mean. The list is a list from Infragistics (UltraWebGrid)
which is a single list control (so far that is great). No above the list I have to create a toolbar type of item that has a whole bunch of images, each performing a function on the list.
My Question now is: How on earth do you create a custom control with more than 1 controls.
Alternative: I have considered (considering the time and effort factor) to create a simple user control, on which I can simply "slot in" as many controls as I like. This is the ultimate option for me at the moment, but there is unfortunately a catch. This control
will be reused in multiple projects, so the replication of the user controls in each project is out. I want to end up with this control compiled into a dll which I can simply reference by other projects. Although this sounds fairly simple and straightforward,
I have not been fortunate enough to solve this. It does not seem as if the project referencing the assembly picks up the user control !?
Please any suggestions on how to solve this would be greatly appreciated, keeping in mind that I do not want to end up changing each project that must implement control too much, incase of causing instability.
Any help or just suggestion on what path I should follow (custom if there is a way to create from multiple control or user controls and how) would be greatly appreciated.
May 29, 2009 10:45 AM|budugu|LINK
Did you considered turning an user control into a redistributable custom control ? Check this briliant post by David..
May 29, 2009 11:32 AM|Slipperman|LINK
if you really need it to be a redistributable dll, you can do what i did - create a custom composite control. just derive your class from CompositeControl. a good reference for server control development is "Professional Asp.Net 2.0 Server Control and Component
Development" by Shahram Khosravi (Wrox)
Jun 02, 2009 01:41 PM|dev_2580|LINK
Jun 02, 2009 03:52 PM|Slipperman|LINK
"My Question now is: How on earth do you create a custom control with more than 1 controls."
use a composite control. did you not see my reply?
Jun 02, 2009 04:26 PM|dev_2580|LINK
Jun 15, 2009 04:06 PM|dev_2580|LINK