Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Posts
    77

    Unanswered: response.redirect and querystring question

    I want to send value request.querystring("stockname") to portfolio.asp
    <%dim namecompany
    namecompany=request.querystring("stockname")
    response.redirect "portfolio.asp?................."
    %>

    How can I write querystring with response.redirect

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    My ASP is rusty (well, this is the SQL forum, not the ASP forum!) but I think the answer is something like:

    <%dim namecompany
    namecompany=request.querystring("stockname")
    response.redirect "portfolio.asp?stockname=" & namecompany
    %>

    I'll move this post to the correct forum so someone else can check my answer...

  3. #3
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Right on Andrew.. looks good to me..
    That which does not kill me postpones the inevitable.

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Do we need to add a urlEncode like this...
    Code:
    <%dim namecompany
    namecompany=request.querystring("stockname")
    response.redirect "portfolio.asp?stockname=" & Server.URLEncode(namecompany)
    %>
    just in case the namecompany has special characters?? I can't remember any more...

  5. #5
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    well.. technically, yes... if you want to be safe, but it's not a requirement for it to function properly.. .
    Last edited by Seppuku; 09-06-04 at 23:14.
    That which does not kill me postpones the inevitable.

  6. #6
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    gotta be perfect right.

  7. #7
    Join Date
    Aug 2004
    Posts
    77
    Thank you very much.It works 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
  •