URL Picker in VS 2005 Property Window

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. .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,...
    5. 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,...
  3. #2

    Default 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

  4. #3

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139