Grab multiple images and display on a web page

Rani

Well-known member
Joined
Nov 19, 2005
Messages
71
Programming Experience
Beginner
How would i display images on a web page from images stored in a dataset from the database. Please note i have to display more than one image on the page as a thumbnail and then to open as a full page image.

Pls give a tip on how i would accomplish this. Thanks a bunch. Rani
 
hyperlinks between two image folders

I have two image folders in my web directory. one folder has small thumbnails and the other folder has larger images. But the images are same in both the folders.
I want to hyper link the small folder to the larger folder so when there is a display of the small images on the web page when the user clicks the small image it should bring up the larger image from the larger file.
using visual studio.net development tool how would i do that?
I know how to using front page.
Thanks/Rani
 
Moved from VB.Net to ASP.Net forum, .Net webpages are developed in ASP. I also deleted your double post, instead of posting new threads with same question over again when nobody answers you could try adding a post to your initial question.
 
Images Related- small image and big image

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. Thanks/Rani
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
 
Datagrid

using datagrid i want to populate filename from database and files from the web directory folders.
I have filename in the database as Elephant001.jpg
couple image folders l_photos and s_photos. Both folders have same images as c:\inetpub\wwwroot\Photographs\s_photos\Elephant001.jpg
I am doing these:
1. Dim sql As String
sql = "select filename from Photographs"
Dim ds As New DataSet
Dim da As New SqlDataAdapter(sql, con)
da.Fill(ds)
Dim dirinfo As New DirectoryInfo(Server.MapPath("s_photos"))
Me.Photolist.DataSource = ds
Me.Photolist.DataBind()
2. <asp:TemplateColumn HeaderText="FileName">
<ItemTemplate><a href="http://localhost/Photographs/s_photos/+ '<%#databinder.eval(container.dataitem, "s_photos")%>'" /></a>
</ItemTemplate>
</asp:TemplateColumn>

This is the error i get:
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name s_photos.
What am i doing wrong?
Can some one help me. I have not been getting any help so far.
Rani
 
Back
Top