composite control embedded resource at designtime

C

Chuck P

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?
 
W

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:
http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220,
thanks.


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

Members online

No members online now.

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top