...

View Full Version : ASP Response link with params



holty
09-20-2005, 11:22 AM
Hi

I have got myself into a muddle here

All i am trying to do is to output a link with id's in the querystring. I am connecting to the database and pulling out the id's. When in my while loop I just want to output the links like so:

response.write ("<a href='/search/doc.asp?id=" & rs("DocID") & "sectionid=" & rs("categoryID")" '>rs("title")</a>")

Any ideas on what i have done wrong?

Thx

NancyJ
09-20-2005, 11:38 AM
response.write ("<a href='/search/doc.asp?id=" & rs("DocID") & "&amp;sectionid=" & rs("categoryID")" '>rs("title")</a>")

holty
09-20-2005, 12:31 PM
Hi

Thanks for that - I still have an error though:

Expected ')'

response.write ("<a href='/search/doc.asp?id=" & rs("DocID") & "&amp;sectionid=" & rs("categoryID")" '>rs("title")</a>")

its expecting an ')' after here - rs("categoryID")"

any ideas?

NancyJ
09-20-2005, 01:22 PM
you could do with a nice editor that will color all the code in for you ;) The errors become more obvious then. Just a matter or missing ampersands and speach marks :)

response.write ("<a href='/search/doc.asp?id=" & rs("DocID") & "&amp;sectionid=" & rs("categoryID")&" '>"&rs("title")&"</a>")

pasted it into dreamweaver to edit - should work now.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum