Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP Response link with params

    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
    Last edited by holty; 09-20-2005 at 11:25 AM.

  • #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,169
    Thanks
    19
    Thanked 65 Times in 64 Posts
    Code:
    response.write ("<a href='/search/doc.asp?id=" & rs("DocID") & "&amp;sectionid=" & rs("categoryID")" '>rs("title")</a>")

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,169
    Thanks
    19
    Thanked 65 Times in 64 Posts
    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
    Code:
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •