Answered by:
How to show embeded image webresource file in DesignMode?

Question
-
User-1821883683 posted
Hi, there!
I get a problem when I develop an WebControls project.
There is an image file named "validatetip.png" in the root of my web control project named "MyControl",
this file is an embeded resource and has been registered as a WebResource like "[assembly: WebResource("MyControl.validatetip.png", "image/png")]".
Now, I wanna display this image file in DesignView, but I don't know how to...
Need your help and that will be very kind of you.
Chrense Lee
Wednesday, April 30, 2008 1:26 AM
Answers
-
User-16411453 posted
I've heard feedback that using embedded image via CS is different than using VB
In CS, most put the image in the webresource folder, and in vb, they put it in the root folder of the control.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, May 1, 2008 2:35 PM
All replies
-
User-110899953 posted
not getting enough knowledge of developing web control,i feel so sorry for undoing you a favor.
it is really complicated for me....
[:)]
Wednesday, April 30, 2008 5:22 AM -
User-16411453 posted
Dim cs As ClientScriptManager = Me.Page.ClientScript
imgProduct.ImageUrl = cs.GetWebResourceUrl(rsType, "MyControl.validatetip.png").ToStringWednesday, April 30, 2008 7:38 PM -
User-1821883683 posted
Dim cs As ClientScriptManager = Me.Page.ClientScript
imgProduct.ImageUrl = cs.GetWebResourceUrl(rsType, "MyControl.validatetip.png").ToString
At design time the Page property of WebControl is null (Nothing), I use your method in runtime rendering. However, thank you for your warm heard all the same.
Is there anybody can help me?
Thursday, May 1, 2008 1:11 AM -
User-16411453 posted
I've heard feedback that using embedded image via CS is different than using VB
In CS, most put the image in the webresource folder, and in vb, they put it in the root folder of the control.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, May 1, 2008 2:35 PM