Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > return recordset of images in specific cells in a table

Reply
Thread Tools

return recordset of images in specific cells in a table

 
 
David Shorthouse
Guest
Posts: n/a
 
      06-27-2005
Hello folks,

I have an interesting problem and am looking for some advice. I am
hoping to build an asp whereby records are pulled from SQL Server. These
records will be merely file locations for thumbnail images I hope to display
in a grid. Rather than having a grid be constructed row-to-row, I was
wondering if it is at all possible to dynamically construct this grid as a
table of thumbnails whereby each cell (perhaps 5-6 columns across)
represents one record? I have no idea how one would construct this loop that
spans columns AND rows rather than just rows.

Thanks for any ideas,

Dave

--
______________________________
Remove "_SPAM" to reply directly.


 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      06-28-2005
Gazing into my crystal ball I observed "David Shorthouse"
<davidshorthouse@shaw_SPAM.ca> writing in
news:(E-Mail Removed):

> Hello folks,
>
> I have an interesting problem and am looking for some advice. I am
> hoping to build an asp whereby records are pulled from SQL Server.
> These records will be merely file locations for thumbnail images I hope
> to display in a grid. Rather than having a grid be constructed
> row-to-row, I was wondering if it is at all possible to dynamically
> construct this grid as a table of thumbnails whereby each cell (perhaps
> 5-6 columns across) represents one record? I have no idea how one would
> construct this loop that spans columns AND rows rather than just rows.
>
> Thanks for any ideas,
>
> Dave
>

Do something like:

<% columns = 5 'how many columns do you want?%>
<table summary="thumbnail gallery">
<tbody>
<% 'get the records
'start a loop
counter = counter + 1
imgsrc = rs(fieldvalue)
desc = rs(description of image if there is one) %>
<td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
<% rs.Movenext
if columns mod counter = 0 then
%>
</tr>
<% if not rs.EOF then%>
<tr>
<% end if%>
<% end if %>
</tbody>
</table>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
 
David Shorthouse
Guest
Posts: n/a
 
      06-29-2005
Thanks! I'll give it a go.

Dave

--
______________________________
Remove "_SPAM" to reply directly.

>
>> Hello folks,
>>
>> I have an interesting problem and am looking for some advice. I am
>> hoping to build an asp whereby records are pulled from SQL Server.
>> These records will be merely file locations for thumbnail images I hope
>> to display in a grid. Rather than having a grid be constructed
>> row-to-row, I was wondering if it is at all possible to dynamically
>> construct this grid as a table of thumbnails whereby each cell (perhaps
>> 5-6 columns across) represents one record? I have no idea how one would
>> construct this loop that spans columns AND rows rather than just rows.
>>
>> Thanks for any ideas,
>>
>> Dave
>>

> Do something like:
>
> <% columns = 5 'how many columns do you want?%>
> <table summary="thumbnail gallery">
> <tbody>
> <% 'get the records
> 'start a loop
> counter = counter + 1
> imgsrc = rs(fieldvalue)
> desc = rs(description of image if there is one) %>
> <td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
> <% rs.Movenext
> if columns mod counter = 0 then
> %>
> </tr>
> <% if not rs.EOF then%>
> <tr>
> <% end if%>
> <% end if %>
> </tbody>
> </table>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share



 
Reply With Quote
 
David Shorthouse
Guest
Posts: n/a
 
      06-30-2005
Adrienne,

It was a good start, but doesn't work. Any chance you can scrutinize your
code again. In particular, I don't know where to put the "loop". The result
of your code is one column of images instead of being spread across columns
and rows.

Thanks for any additional suggestions,

Dave
______________________________
Remove "_SPAM" to reply directly.
"Adrienne" <(E-Mail Removed)> wrote in message
news:Xns9683640B75525arbpenyahoocom@207.115.63.158 ...
> Gazing into my crystal ball I observed "David Shorthouse"
> <davidshorthouse@shaw_SPAM.ca> writing in
> news:(E-Mail Removed):
>
>> Hello folks,
>>
>> I have an interesting problem and am looking for some advice. I am
>> hoping to build an asp whereby records are pulled from SQL Server.
>> These records will be merely file locations for thumbnail images I hope
>> to display in a grid. Rather than having a grid be constructed
>> row-to-row, I was wondering if it is at all possible to dynamically
>> construct this grid as a table of thumbnails whereby each cell (perhaps
>> 5-6 columns across) represents one record? I have no idea how one would
>> construct this loop that spans columns AND rows rather than just rows.
>>
>> Thanks for any ideas,
>>
>> Dave
>>

> Do something like:
>
> <% columns = 5 'how many columns do you want?%>
> <table summary="thumbnail gallery">
> <tbody>
> <% 'get the records
> 'start a loop
> counter = counter + 1
> imgsrc = rs(fieldvalue)
> desc = rs(description of image if there is one) %>
> <td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
> <% rs.Movenext
> if columns mod counter = 0 then
> %>
> </tr>
> <% if not rs.EOF then%>
> <tr>
> <% end if%>
> <% end if %>
> </tbody>
> </table>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share



 
Reply With Quote
 
David Shorthouse
Guest
Posts: n/a
 
      07-01-2005
Adrienne,

Got it all fixed-up and works a treat now.

Dave

--
______________________________
Remove "_SPAM" to reply directly.
"Adrienne" <(E-Mail Removed)> wrote in message
news:Xns9683640B75525arbpenyahoocom@207.115.63.158 ...
> Gazing into my crystal ball I observed "David Shorthouse"
> <davidshorthouse@shaw_SPAM.ca> writing in
> news:(E-Mail Removed):
>
>> Hello folks,
>>
>> I have an interesting problem and am looking for some advice. I am
>> hoping to build an asp whereby records are pulled from SQL Server.
>> These records will be merely file locations for thumbnail images I hope
>> to display in a grid. Rather than having a grid be constructed
>> row-to-row, I was wondering if it is at all possible to dynamically
>> construct this grid as a table of thumbnails whereby each cell (perhaps
>> 5-6 columns across) represents one record? I have no idea how one would
>> construct this loop that spans columns AND rows rather than just rows.
>>
>> Thanks for any ideas,
>>
>> Dave
>>

> Do something like:
>
> <% columns = 5 'how many columns do you want?%>
> <table summary="thumbnail gallery">
> <tbody>
> <% 'get the records
> 'start a loop
> counter = counter + 1
> imgsrc = rs(fieldvalue)
> desc = rs(description of image if there is one) %>
> <td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
> <% rs.Movenext
> if columns mod counter = 0 then
> %>
> </tr>
> <% if not rs.EOF then%>
> <tr>
> <% end if%>
> <% end if %>
> </tbody>
> </table>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share



 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      07-01-2005
Gazing into my crystal ball I observed "David Shorthouse"
<davidshorthouse@shaw_SPAM.ca> writing in news:eZ#MnRefFHA.1148
@TK2MSFTNGP12.phx.gbl:

> Adrienne,
>
> Got it all fixed-up and works a treat now.
>
> Dave
>


Glad I was able to help. It works for printing labels, too.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fitting images to table cells kylejpatrick@yahoo.com HTML 11 04-15-2012 12:59 AM
Adding Table Cells and Images/Links (ASP.NET Controls) Dynamically Carl Gilbert ASP .Net 0 07-20-2005 12:47 AM
PROBLEM: Images have spaces between table cells jcnews at earthlink.net HTML 3 11-25-2004 05:59 AM
Images in Table Cells MrC HTML 3 10-06-2004 09:35 AM
RecordSet.Move or RecordSet.AbsolutePosition?? Hung Huynh ASP General 8 09-24-2003 11:07 AM



Advertisments