composite control embedded resource at designtime

Discussion in 'ASP .Net Building Controls' started by Chuck P, Sep 24, 2007.

  1. Chuck P

    Chuck P Guest

    In my protected override void CreateChildControls()
    I am trying to create an image control where the image is an embedded
    resource.


    Image img = new Image();
    Page page = System.Web.HttpContext.Current.Handler as Page;
    img.ImageUrl =
    page.ClientScript.GetWebResourceUrl(this.GetType(), @"Util.Ctrl.some.gif");

    This doesn't work because page is null at design time.
    How do I retrieve the embedded resource at design time?
    Chuck P, Sep 24, 2007
    #1
    1. Advertising

  2. Hi Chuck,

    Like we've discussed about accessing embedded CSS at design-time, it's
    unfortunately not possible to access the embedded resource at design-time
    either. Sorry for the inconvenience caused.

    Please feel free to submit your feedback here:
    http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220,
    thanks.


    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Walter Wang [MSFT], Sep 25, 2007
    #2
    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. sleigh
    Replies:
    1
    Views:
    2,666
    sleigh
    Feb 12, 2004
  2. Dirc Khan-Evans
    Replies:
    1
    Views:
    883
    Karl Seguin
    Oct 17, 2005
  3. Mike

    Refreash DesignTime control.

    Mike, Jan 11, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    408
  4. rotsj
    Replies:
    2
    Views:
    351
    rotsj
    Jan 11, 2007
  5. Chad
    Replies:
    0
    Views:
    209
Loading...

Share This Page