Just use like that. /web1/img1.jpg And click to solution than properties page. There is a virtual page. Change it like "/".
kad1r
2010-10-19 12:19:59
Just use like that. /web1/img1.jpg And click to solution than properties page. There is a virtual page. Change it like "/".
This answer is from http://stackoverflow.com/questions/3912273/image-from-usercontrol-wont-display-on-webform/3914074#3914074
Since you found out the id change is what caused the problem, the only solution is to use classes to style your html markups:
html
//some people don't know this but you can also put the style directly into the asp.net control event if visual studio doesn't support it in the intellisense <asp:Label id="label1" CssClass="test" style="color:blue;" runat="server" />
css
.test { color:red; }
If you still want to use the id to style your code, then you can either put the long generated id into your css code or upgrade to asp.net 4 which gives control over your asp.net ids, for example:
<asp:Label id="label1" ClientIDMode="Static" runat="server"
/>
There are 3rd party solutions to give your control over the ids for asp.net 3.5 and below but they are not out of the box and needs some fiddling.