Embedded Resources in base class [modified]
-
I have two projects: 1) MyProject1 2) MyProject2 Directory Structure MyProject1 -Images ---BaseControl ------img1.gif ------img2.gif ------img3.gif -Css ---BaseControl ------StyleSheet.css -Controls ---BaseControl.cs - derived from CompositeControl ---Derived1.cs - derived from BaseControl ---Derived11.cs - derived from BaseControl ---Derived12.cs - derived from BaseControl MyProject2 -Controls ---Derived4.cs - derived from BaseControl Assembly.cs for MyProject1 NOTE: Image is set as an embedded resource [assembly: WebResource("MyProjects1.Images.BaseControl.gif", "img/gif")] To get the link to the WebResource, I do the following:
myImgControl.ImageUrl = this.GetImageUrl("MyProject1.Images.BaseControl.gif");
This works fine with Derived1, Derived11 and Derived12 controls since the embedded resource is available to their parent. However, Derived4 control cannot find the images because the 'MyProject1.Images.BaseControl.gif' is not part of its embedded resource. Let me know if you need anymore info. Thanks.modified on Wednesday, August 11, 2010 6:43 PM