Last post Feb 04, 2013 10:34 PM by Angie xu - MSFT
Jan 28, 2013 01:48 AM|DonIzzBack|LINK
i face this problem after publishing my website , & not on running it normally
i got point where i m stuck in this problem.......
there r 2 listview for 2 different menu
say menu1 - listview1
& menu2 - listview2
now comming to problem
in listview1 im showing image throug giving direct url of image...
eg dr.item("images") = C:/Donizzback/image1.ico
but in listview2 i m showing image through calculating the value of other columns of datatable & then making that praticular image
as per value in database, & then saving it to a particular folder & then giving url of that image to listview2
Dim i As Integer = 0
Dim img_str As String = ""
For Each dr As DataRow In dtt.Rows //// starting with 0 th row img0.ico will be created in given path , similarly for 1st row img1.ico etc,
Dim po As Integer = dr.Item("TLQ")
Labeltlq.Text = po
img_str = "img_" & i & ".ico"
strf = Nothing
Dim oCounter As Bitmap = New Bitmap(96, 16)
Dim oGraphics As Graphics = Graphics.FromImage(oCounter)
Dim objimage As Bitmap
dr.Item("bitmaps") = Nothing
Dim x1 As Integer
x1 = (Labeltlq.Text >> 0) And mask1
If x1 = 1 Then
objimage = New Bitmap(Applicationpath & "TLQImages\scanInhibit.ico")
oGraphics.DrawImage(objimage, 0, 0)
oCounter.Save(Applicationpath & "TLQImages/" & img_str) 'bmp
dr.Item("bitmaps") = "TLQImages/" & img_str
ElseIf x1 = 0 Then
As each bitmap is (16,16) in size & i mentioned total size of bitmap (96,16)
that means in all at a time in row i can show 6 image (here i m adding image)
i = i + 1
img_str = Nothing
so here is problem its not able to calculat image & save it & call back image to particular row .......
so its not showing listview2...
this i found by replacing image with particular string & then adding string & placing it in listview2 this works properly....
Feb 04, 2013 10:34 PM|Angie xu - MSFT|LINK
I think you could post this issue to System.Drawing/GDI+ forum(http://forums.asp.net/150.aspx/1?System+Drawing+GDI+) , you could get quick response there, more professionals will share experience
and solutions with you.
At the same time you could also learn relevant topic about retrieving image from database using vb.net.
hope it helps you,