all groups > asp.net building controls > september 2007 >
You're in the

asp.net building controls

group:

composite control embedded resource at designtime


composite control embedded resource at designtime Chuck P
9/24/2007 3:18:03 PM
asp.net building controls:
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.
RE: composite control embedded resource at designtime wawang NO[at]SPAM online.microsoft.com (
9/25/2007 12:00:00 AM
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 (wawang@online.microsoft.com, 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.
AddThis Social Bookmark Button