B
bone_idle31
I have a folder in the web directory with all the images in them
(ex:c:\inetpub\wwwroot\Photographs\l_photos\Elephant001.jpg)and the
image folder is named as "l_photos". Large pictures
Also there is another file identical only difference is i call it as
"s_photos" For thumbnails small pictures.
I have the names (ex:Elephant001.jpg)to the mages stored in a database
column filename.
I am using a datagrid to display the images on the page. Like i want to
display thumbnails first and then when the user clicked this small
thumbnail i want large image open.
Is there any sample code for this? If not atleast tell me if i am
writing the code below is correct to head the right direction? I would
appreciate the help.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim sql As String
sql = "select * from Photographs"
Dim ds As New DataSet
Dim da As New SqlDataAdapter(sql, con)
da.Fill(ds)
Dim filename As ICollection (error is Input string was not in a
correct format)
If ds.Tables(0).Rows(0).Item("filename") Then
filename = Directory.GetFiles(Server.MapPath("l_photos"),
"*.jpg")
Me.Photolist.DataSource = filename
Me.Photolist.DataBind()
End If
End Sub
Thanks
(ex:c:\inetpub\wwwroot\Photographs\l_photos\Elephant001.jpg)and the
image folder is named as "l_photos". Large pictures
Also there is another file identical only difference is i call it as
"s_photos" For thumbnails small pictures.
I have the names (ex:Elephant001.jpg)to the mages stored in a database
column filename.
I am using a datagrid to display the images on the page. Like i want to
display thumbnails first and then when the user clicked this small
thumbnail i want large image open.
Is there any sample code for this? If not atleast tell me if i am
writing the code below is correct to head the right direction? I would
appreciate the help.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim sql As String
sql = "select * from Photographs"
Dim ds As New DataSet
Dim da As New SqlDataAdapter(sql, con)
da.Fill(ds)
Dim filename As ICollection (error is Input string was not in a
correct format)
If ds.Tables(0).Rows(0).Item("filename") Then
filename = Directory.GetFiles(Server.MapPath("l_photos"),
"*.jpg")
Me.Photolist.DataSource = filename
Me.Photolist.DataBind()
End If
End Sub
Thanks