Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Link Depending On Value In Recordset VBS/ASP

Status
Not open for further replies.

webstaff

Technical User
Jan 2, 2003
97
0
0
GB
Hi Guys,

Im a little stuck with my VBS on my ASP pages.

I have a recordset that gets pulled, and depending on the value of one of the returned fields I want to show a link or not.

Here is the HTML code that I want to be displayed

Code:
 <td height="14" bgcolor="#00FF00"> <div align="left"><font size="+1" face="Verdana, Arial, Helvetica, sans-serif"><A HREF="test_ped/ped_search.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & RS_sbt_results.Fields.Item("field_id").Value %>">Planner</A></font></div></td>

So I tried something like this but its not working!!

Code:
If  (RS_sbt_results.Fields.Item("field_sex").Value) = "f" Then
Response.write "<td height="14" bgcolor="#00FF00"> <div align="left"><font size="+1" face="Verdana, Arial, Helvetica, sans-serif"><A HREF="test_ped/ped_search.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & RS_sbt_results.Fields.Item("field_id").Value %>">Planner</A></font></div></td>
"
end if

But its not right, I wonder if someone could help me out here.
Many thanks in advance
Regards
C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top