ImageUrlEditor will not open

Discussion in 'ASP .Net Building Controls' started by James Williams, Sep 20, 2003.

  1. Hello,

    I'm trying to create a server control, and am having difficulty getting a
    child hyperlink control to display the ImageUrlEditor at design time.

    In my webcontrol, I've created a control HyperLink _openHyperLink which is
    instantiated in the constructor.

    I have a custom style property (below) that implements style and adds the
    ImageUrl property. At design time, the Style does expand, but when I click
    on the ImageUrl button to open up the ImageUrlEditor, nothing happens. Any
    suggestions?

    public virtual HyperLinkStyle OpenHyperLinkStyle
    {
    get
    {
    if (_openHyperLinkStyle == null)
    {
    _openHyperLinkStyle = new HyperLinkStyle( _openHyperLink );
    if (IsTrackingViewState)
    {
    ((IStateManager)_openHyperLinkStyle ).TrackViewState();
    }
    }
    return _openHyperLinkStyle;
    }
    }

    public class HyperLinkStyle : Style
    {
    private HyperLink owner;

    public HyperLinkStyle( HyperLink owner )
    {
    this.owner = owner;
    this.owner.Text = "HyperLink";
    }

    [
    Bindable(true),

    DesignerSerializationVisibility(DesignerSerializationVisibility.Visible),
    NotifyParentProperty(true),
    Editor(typeof(ImageUrlEditor),typeof(UITypeEditor)),
    DefaultValue("")
    ]
    public string ImageUrl
    {
    get
    {
    return this.owner.ImageUrl;
    }
    set
    {
    this.owner.ImageUrl = value;
    }
    }
    }
    James Williams, Sep 20, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2FyYQ==?=

    ImageUrlEditor

    =?Utf-8?B?c2FyYQ==?=, Dec 5, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    418
    =?Utf-8?B?c2FyYQ==?=
    Dec 5, 2004
  2. =?Utf-8?B?c2FyYQ==?=

    ImageUrlEditor

    =?Utf-8?B?c2FyYQ==?=, Dec 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    383
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
    Dec 7, 2004
  3. =?Utf-8?B?c2FyYQ==?=

    ImageUrlEditor

    =?Utf-8?B?c2FyYQ==?=, Dec 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    504
    =?Utf-8?B?c2FyYQ==?=
    Dec 9, 2004
  4. SilentCry

    ImageUrlEditor - why can't i find it?

    SilentCry, May 1, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    779
    SilentCry
    May 1, 2009
  5. Ray

    ImageUrlEditor on subcontrol does not work

    Ray, Jun 6, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    139
Loading...

Share This Page