Composite Controls
Hi all.
I'm in the process of creating a composite control using C# and Visual Studio Prof 2005. The control takes an Image Url as one of its properties and this is defined in the component as:
//snippet of code
private String _FirstImageURL;
[
Category("Images"),
Description("The URL of the Image - e.g ~/images/first.gif"),
Browsable(true)
]
public String FirstImageURL
{
get { return _FirstImageURL; }
set { _FirstImageURL = value; }
}
//end code snippet
However, this doesn't give the desired effect when the component is being used in a project. Where the built in ASP:Image component has a button in the properties to allow the programmer to browse for the image within the current project, mine is just a normal text box.
I have tried many different ideas including changing the type from String to Image in the component code.
Does anyone have any ideas of how I can achieve this browsing option in the property of my component?
Thanks in advance,
Orig. :)
(p.s. please let me know if you need me to explain it better, I realise I might not be explaining this very well!)
|