Images Related

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
 
G

Guest

Bones,

I'm a programmer not a photostore. Looks like your on to something. 2.0
ASP.Net store photos in APP_Data folder to prevent unauthorized downloads.
I'd make the thumbs in advance on a pc, with the watcher class, or when
individual files are uploaded.

Good Luck
DWS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top