Web User Control ImageUrlEditor Problem

Last post 06-26-2009 7:08 AM by vrharry. 4 replies.

Sort Posts:

  • Web User Control ImageUrlEditor Problem

    06-18-2007, 4:50 PM
    • Member
      51 point Member
    • oswaldorb
    • Member since 04-02-2007, 3:32 PM
    • Houston
    • Posts 28

    I'm writing a User Control. One of the properties that I have is a URL for an image. I'm using the ImageUrlEditor, so in design time the user could select the image, that will represent the URL. But it doesn't show anything, I does not give me the option to select an image. So I guess I'm out of ideas at this point.

     This is the code I'm using:

     

    [Browsable(true)]

    [Category("MyConfiguration")]

    [Editor(typeof(ImageUrlEditor), typeof(UITypeEditor))]

    public string IconImageURL

    {

    get { return _iconImageURL; }

    set { _iconImageURL = value; }

    }

    ______________________________________________
    Oswaldo Rodriguez
    ozinabox.com
  • Re: Web User Control ImageUrlEditor Problem

    06-19-2007, 1:35 PM
    • Contributor
      2,214 point Contributor
    • mosessaur
    • Member since 07-11-2002, 6:40 PM
    • Cairo
    • Posts 353

    Try to add this attribute [UrlProperty] in addition to the Editor property.
    [Browsable(true)]
    [Category("MyConfiguration")]
    [Editor(typeof(ImageUrlEditor), typeof(UITypeEditor))]
    [UrlProperty]
    public string IconImageURL
    {
     
    get { return _iconImageURL; }
     
    set { _iconImageURL = value; }
    }

    Hope this would resolve your issue

    Muhammad M. Mosa Soliman
    Software Engineer
  • Re: Web User Control ImageUrlEditor Problem

    06-19-2007, 3:05 PM
    • Member
      51 point Member
    • oswaldorb
    • Member since 04-02-2007, 3:32 PM
    • Houston
    • Posts 28

    Thanks for the answer but it did not work. I just did an example.. created my own UITypeEditor on winforms, used it on a user control.. added it to the form, and it's working.. but I try to use this one on my Web User Control, and it just won't work.. and it seems I'm the only one with the issue.

     

    Any other ideas?

    ______________________________________________
    Oswaldo Rodriguez
    ozinabox.com
  • Re: Web User Control ImageUrlEditor Problem

    06-22-2007, 12:27 AM
    Answer

    Hi,

    It seems you're trying to use the "UrlProperty" or "Editor" design-time attributes on an ASCX usercontrol to provide design-time Url editing functionality, these design-time properties(also the design-time services in IDE) is only appliable to custom web server control rather than ascx user controls. For ASCX usercontrols, they're template based, the property and inner control should be edited inline in the ascx template (or in the aspx page's inline template).

    Thanks.

    Michael Jin.
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Web User Control ImageUrlEditor Problem

    06-26-2009, 7:08 AM
    • Member
      4 point Member
    • vrharry
    • Member since 06-09-2009, 5:33 AM
    • Posts 4

    hi

    Hi

    I am having the same problem. could you please explain how to go about it..

    thanks..

    Harry

    vrhari@air.org.in

Page 1 of 1 (5 items)