In ASP I used to make a thumbnail display something like this:
------------------------------------
-------------------------------
Basically I made a table on the fly with (in this case ) 4 columns and as many rows as the recordset required.
I've spent two nasty days trying to figure out how to do something like this in ASP.NET. I'm sure there's some real easy way, but I'm beat (so far).
My counter, for example, loses scope between when I create it and when I use it.
I'm sure I should be using some cunning code-behind trick but it entirely escapes me.
Any help greatly appreciated.
Thanks
DOug
------------------------------------
Code:
<% dim counter = 0 %>
<head>
</head>
<body>
<table>
<tr>
<% While (NOT rsItems.EOF)%>
<td class="gallery">
<a href="image.aspx?ID=<%=(rsItems.Fields.Item("ID").Value)%>">
<img src="<%=(rsItems.Fields.Item("Path").Value)%>">
</a>
</td>
<%
counter=counter+1
rsItems.MoveNext()
If (counter Mod 4 = 0) then
%>
<td></td>
</tr>
<%end if%>
<%Wend
%>
</table>
...etc.
Basically I made a table on the fly with (in this case ) 4 columns and as many rows as the recordset required.
I've spent two nasty days trying to figure out how to do something like this in ASP.NET. I'm sure there's some real easy way, but I'm beat (so far).
My counter, for example, loses scope between when I create it and when I use it.
I'm sure I should be using some cunning code-behind trick but it entirely escapes me.
Any help greatly appreciated.
Thanks
DOug