Hi all,
i am facing a problem to display image in IE 7.0 which are coming from my database (SQLSEREVER2005).
for displaying image i am using folloeing code.
Public Sub DataImage()
Connstring = ConfigurationManager.ConnectionStrings("TestingConnectionString").ConnectionString
'Conn = New SqlConnection(ConfigurationManager.AppSettings("conn_string"))
Conn = New SqlConnection(Connstring)
If Conn.State = ConnectionState.Closed Then Conn.Open()
i = DropDownList1.SelectedValue
Dim sqlcommand2 = New SqlCommand("select pictureName,PictuerID from pictureImage where PictuerId='" & i & "'", Conn)
dr = sqlcommand2.ExecuteReader()
If dr.Read Then
IM = dr.Item("pictureName")// picture name
Panel1.Width = 200
Panel1.Height = 200
Image1.ImageUrl = Server.MapPath("~") & "\" & IM
Image1.Height = 100
Image1.Width = 100
End If
End Sub
this code excute fine but image are not displaying
Its urgent,thks