J
Jon Paal
sample code which is failing to display the image
rootnamespace.........
myproject
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">
but it does not display in the web page.
by using reflector I can see the image is stored in the DLL as a resource and is correctly named
What am I missing ????
rootnamespace.........
myproject
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">
but it does not display in the web page.
by using reflector I can see the image is stored in the DLL as a resource and is correctly named
What am I missing ????