can't display resource image

J

Jon Paal

sample code which is failing to display the image

====================================================

Assembly code................
<Assembly: WebResource("Logo.gif", "image/gif")>


code ...............
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Web
Imports System.Web.UI
Imports Microsoft.VisualBasic

NameSpace namespace1

Class class1
Inherits System.Web.UI.Page
Implements IHttpHandler

Public Function showimg() As String

Dim Response As HttpResponse = HttpContext.Current.Response
Dim returnValue As String = String.Empty
returnValue = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "Logo.gif")
response.write( "<img src=""" & returnValue & """>")

End Function

End Class
End Namespace

viewsource output for image is ...................

<img src="/WebResource.axd?d=whMLBJ8IDJGvV_odhtKmwHKuto9Ppv4U7VgziTrNxAtrvyWBq8_A4mRnZzRjVosI0&t=632935792220000000">by using
reflector I can see the image is stored in the DLL as a resource and is correctly named, but it does not display in the web
page.What am I missing ?????
 

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,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top