navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

display image from file with link from database...?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> display image from file with link from database...?
Page: [1]
 
vashonmm

 

Posts: 26
Joined: 1/9/2006
Status: offline

 
display image from file with link from database...? - 3/21/2008 14:44:05   
more newbie numbness here. i'm thinking i want to use ms sql express and EW to put a furniture catalog on a windows web server. for instance, a page would show just tables and each product would give a model, description, dimensions and a thumbnail which would also link to a larger image. i think i have enough bits and pieces to get started but i'm kinda hung up on the part about displaying the thumbnails and images. anyone got a tut or sample that'll help wrap my head around it?

i gather i'll just keep a link to the image in the database and there'll be some trickyness involved getting a hyperlink to a full size image passed on with the thumbnail but i can't seem to bring myself to start tinkering with the idea until i understand how that's going to work.

maybe it's way more complex than i think and can't be wrapped up in a simple explanation but it sure seems like a common task these days. there's plenty of info on setting up the sql express db and displaying verbal data with EW but i haven't found anything that explains how to do the thumbnail and link to full image. i ran into a good post here about coding through the thumbnail/hyperlink/full image problems but i haven't got to the point of understanding if that's the type of problem i'll have with sql exp and EW.

thanks,

matthew
rdouglass

 

Posts: 9224
From: Biddeford, ME USA
Status: offline

 
RE: display image from file with link from database...? - 3/21/2008 23:54:52   
In it's simplest form, it may be a scenario where you have all your images in a directory called prodimages. Then, inside that directory, you have images like prod1000.jpg, prod1340.jpg, etc.

Your database could hold a text field entry called "ImageFileName" storing obvilusly the image file name and to retrieve the image, the code could look something like:

<img src="/prodimages/<%=rs("ImageFileName")%>">

Or something to that effect. Does that make any sense? See, in most cases, you store the image file name (and sometimes the path as well) and you want to fill in the <img> tag with the appropriate file name and/or path from the db.

That help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to vashonmm)
rdouglass

 

Posts: 9224
From: Biddeford, ME USA
Status: offline

 
RE: display image from file with link from database...? - 3/21/2008 23:59:53   
quote:

<img src="/prodimages/<%=rs("ImageFileName")%>">


Now part two of that could be as simple as having 2 images but using a pattern as in lrg_prod1000.jpg, lrg_prod1340.jpg, etc.

Then the link to your full size image could look something like:

<a href="="/prodimages/lrg_<%=rs("ImageFileName")%>" target="_blank"><img src="/prodimages/<%=rs("ImageFileName")%>" border=0></a>

See what I did? Of course there could be almost limitless variations on that but typically they involve some kind of consistent naming scheme. Either that or they have a second DB field for the full size image but that is less popular.

Does that help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to rdouglass)
vashonmm

 

Posts: 26
Joined: 1/9/2006
Status: offline

 
RE: display image from file with link from database...? - 3/22/2008 2:20:30   
ah, mr. rdoug, i think i see how far out in left field i was, looking at a girl in the bleachers no less, instead of watching the ball. since i haven't actually put pen to paper, just been reading and watching tuts, i didn't realize the page was going to work, well, like a page.

i was thinking there had to be something more involved, some kind of middleware programming, vb or something. didn't occur to me that the code would do it. it made sense when i was looking at doing it with an xml file, somehow that seemed more accessibile for web stuff than a database. just couldn't believe it'd be that straightforward.

so, i spent two days trying to figure out what the secret was. had a guy tell me once, "you think you're thinking even when you think you're not thinking" because he thought i overthought things. ya think?

oh well, i needed to go through those tuts anyway. thanks so much. back to "work".

matthew

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> display image from file with link from database...?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts