Ask a Question related to ASP.NET Building Controls, Design and Development.
-
steve_barker333@hotmail.com #1
URL Picker in VS 2005 Property Window
Hi guys!
I'm sure this is an easy question to answer, and I'm equally sure that
the solution involves designer attributes, but I can't seem to find the
correct attribute to use!
Here goes...
You know the Image control in ASP.NET? When you draw an instance on a
web form, and click in ImageUrl in the property window, you get the
"..." button and nice file browser window to help you find the Url. How
do I replicate this behaviour in my custom controls?
Many thanks in advance!
Steve.
steve_barker333@hotmail.com Guest
-
DefaultValue for Public Property of ASP.NET 2.0 UserControl not appearing in Properties Window
First, I'm using Visual Web Developer 2005 Express Edition, which I hope is exactly the same as Visual Studio 2005 minus a bunch of useful... -
Child window property window.opener null after postback
I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the... -
using the Items property in the design time property window
I hope this is the proper forum. I posted this problem in the wrong one previously. I have a custom server control that I am building. Implementing... -
.Net 2003 property window won't open
Microsoft windows .Net 2003 I have a mayor problem! My property window won't open. I tried using to dynamic help to open the property window,... -
aspnet property window won't open
Microsoft windows .Net 2003 I have a mayor problem! My property window won't open. I tried using the dynamic help to open the property window,... -
Steve C. Orr [MVP, MCSD] #2
Re: URL Picker in VS 2005 Property Window
You do it like this:
[Editor(typeof(System.Web.UI.Design.ImageUrlEditor) ,
typeof(System.Drawing.Design.UITypeEditor))]
public virtual string MyImageUrl
{
get
{
...
}
set
{
...
}
}
Here's more info and a more detailed example:
[url]http://SteveOrr.net/articles/InheritAndExtend.aspx[/url]
--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
[url]http://SteveOrr.net[/url]
<steve_barker333@hotmail.com> wrote in message
news:1161806648.477689.201290@i3g2000cwc.googlegro ups.com...> Hi guys!
>
> I'm sure this is an easy question to answer, and I'm equally sure that
> the solution involves designer attributes, but I can't seem to find the
> correct attribute to use!
>
> Here goes...
>
> You know the Image control in ASP.NET? When you draw an instance on a
> web form, and click in ImageUrl in the property window, you get the
> "..." button and nice file browser window to help you find the Url. How
> do I replicate this behaviour in my custom controls?
>
> Many thanks in advance!
>
> Steve.
>
Steve C. Orr [MVP, MCSD] Guest
-
steve_barker333@hotmail.com #3
Re: URL Picker in VS 2005 Property Window
Hi Steve!
Thanks for your help!
Your code works fine when you view the UserControl in it's own
designer, but when you put the UserControl on a web-form, the
properties are not working correctly. Have I missed something?!
Cheers,
Steve.
Steve C. Orr [MVP, MCSD] wrote:> You do it like this:
>
> [Editor(typeof(System.Web.UI.Design.ImageUrlEditor) ,
> typeof(System.Drawing.Design.UITypeEditor))]
> public virtual string MyImageUrl
> {
> get
> {
> ...
> }
> set
> {
> ...
> }
> }
>
> Here's more info and a more detailed example:
> [url]http://SteveOrr.net/articles/InheritAndExtend.aspx[/url]
>
> --
> I hope this helps,
> Steve C. Orr
> MCSD, MVP, CSM
> [url]http://SteveOrr.net[/url]
>
>
>
> <steve_barker333@hotmail.com> wrote in message
> news:1161806648.477689.201290@i3g2000cwc.googlegro ups.com...> > Hi guys!
> >
> > I'm sure this is an easy question to answer, and I'm equally sure that
> > the solution involves designer attributes, but I can't seem to find the
> > correct attribute to use!
> >
> > Here goes...
> >
> > You know the Image control in ASP.NET? When you draw an instance on a
> > web form, and click in ImageUrl in the property window, you get the
> > "..." button and nice file browser window to help you find the Url. How
> > do I replicate this behaviour in my custom controls?
> >
> > Many thanks in advance!
> >
> > Steve.
> >steve_barker333@hotmail.com Guest



Reply With Quote

