473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Images Related

I have a folder in the web directory with all the images in them
(ex:c:\inetpub\wwwroot\Photographs\l_photos\Elepha nt001.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

Mar 14 '06 #1
1 985
DWS
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
"bo*********@yahoo.com" wrote:
I have a folder in the web directory with all the images in them
(ex:c:\inetpub\wwwroot\Photographs\l_photos\Elepha nt001.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

Mar 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jason | last post by:
Hi, I wish to create a little game where you drag pieces onto a board. I have been playing around with a picture box: Private Sub Picture1_DblClick() Picture1.Left = Picture1.Left + 50 End...
6
by: Robert J. O'Hara | last post by:
I'm one of those people who practices what some consider "dull" and others consider "elegantly conservative" page design. I appreciate good traditional typography and standards-compliant liquid...
5
by: Amir | last post by:
When prefetching images, why do I need the "if (document.images)" statement? if (document.images) { pic1on= new Image(300,300); pic1on.src="pic1.gif"; pic2on= new Image();...
16
by: Peter Maas | last post by:
The XHTML file below creates a 2x2 matrix of square images. There is always some space at the bottom borders of the cells (when rendered with Gecko and KHTML, not with IE) and I've found no way so...
0
by: Jim | last post by:
I know this is a little off-topic for C#, but I'm writing my user controls with C#, and the other more HTML-related groups looked like there hasn't been activity in days for some reason......
2
by: mikeoley | last post by:
Ok I have a Javascript slideshow working. Every image is linked to a another page in the site. Problem is...The link wont refresh to the next link once the second images rollovers in the slideshow....
10
by: mrajanikrishna | last post by:
Hello friends, I have developed an application using ASP.NET and SQL Server. Ours is a garment factory. I need to design another module in my application. I want to generate images on fly...
8
by: prasath03 | last post by:
Hi Experts, Please Help me its very urgent..... I stored number of images and related informations are in MS-SQL database, datatype is "image". I want to display all the images and ...
11
by: Jankie | last post by:
I need to dispaly a user's multiple images in one entry.Right now,say if a user uploads 3 images,three entries for the same id display to match 3 images. I only want 1 entry to display all of a...
0
by: Jankie | last post by:
Hey you all ! Happy holidays ! I have 2 tables: Ads ad_id primary ... ..
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.