I want to make the "pic" the hyper link to detail.asp instead of the "name" - I cannot seem to get the syntax to work - can anybody help ....
Full Code ---------
<% CONST COL_COUNT = 2
If Not abc.EOF Then abc.MoveFirst
col_ctr = 0 'not really necessary
sec_row = ""
Response.Write "<table width=300 ><tr><th colspan=""" & COL_COUNT & """></th></tr>"
Do Until abc.EOF
If col_ctr mod COL_COUNT = 0 Then
Response.Write "<tr>"
sec_row = "<tr>"
third_row = "<tr>"
End If
Response.Write "<td width=145 cellpadding= 3 cellspacing=2 align=center class=imageframe ><IMG src='../upload/thumbs/"
If Trim(abc.Fields.Item("pic").Value) = ""
Then Response.Write "../upload/thumbs/image_1.jpg"
Else Response.Write abc.Fields.Item("pic").Value
End If
Response.Write "'></td>"
sec_row = sec_row & "<td cellpadding= 3 cellspacing=2 width=145 align=left valign=top ><a class=greendata target=frame href='detail.asp?name=" & abc("name") & "'>" & abc("name") & " </a></td>"
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then
Response.Write "</tr>"
Response.Write sec_row & "</tr>"
Response.Write third_row & "</tr>"
Response.Write "<tr><td> </td></tr>" 'blank row could format this
End If
'used to be: col_cnt = col_cnt + 1
col_ctr = col_ctr + 1
abc.MoveNext
Loop
Response.Write "</table>"%>
Full Code ---------
<% CONST COL_COUNT = 2
If Not abc.EOF Then abc.MoveFirst
col_ctr = 0 'not really necessary
sec_row = ""
Response.Write "<table width=300 ><tr><th colspan=""" & COL_COUNT & """></th></tr>"
Do Until abc.EOF
If col_ctr mod COL_COUNT = 0 Then
Response.Write "<tr>"
sec_row = "<tr>"
third_row = "<tr>"
End If
Response.Write "<td width=145 cellpadding= 3 cellspacing=2 align=center class=imageframe ><IMG src='../upload/thumbs/"
If Trim(abc.Fields.Item("pic").Value) = ""
Then Response.Write "../upload/thumbs/image_1.jpg"
Else Response.Write abc.Fields.Item("pic").Value
End If
Response.Write "'></td>"
sec_row = sec_row & "<td cellpadding= 3 cellspacing=2 width=145 align=left valign=top ><a class=greendata target=frame href='detail.asp?name=" & abc("name") & "'>" & abc("name") & " </a></td>"
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then
Response.Write "</tr>"
Response.Write sec_row & "</tr>"
Response.Write third_row & "</tr>"
Response.Write "<tr><td> </td></tr>" 'blank row could format this
End If
'used to be: col_cnt = col_cnt + 1
col_ctr = col_ctr + 1
abc.MoveNext
Loop
Response.Write "</table>"%>