composite control embedded resource at designtime


Chuck P

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

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?



Walter Wang [MSFT]

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:,

Walter Wang ([email protected], 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.

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question