If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > response.redirect and querystring question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-04, 11:34
gop373 gop373 is offline
Registered User
 
Join Date: Aug 2004
Posts: 77
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
Reply With Quote
  #2 (permalink)  
Old 09-06-04, 12:35
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
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...
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 09-06-04, 14:26
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Right on Andrew.. looks good to me..
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #4 (permalink)  
Old 09-06-04, 19:17
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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...
Reply With Quote
  #5 (permalink)  
Old 09-06-04, 20:04
Seppuku Seppuku is offline
Useless...
 
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.. .
__________________
That which does not kill me postpones the inevitable.

Last edited by Seppuku; 09-06-04 at 22:14.
Reply With Quote
  #6 (permalink)  
Old 09-06-04, 20:42
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
gotta be perfect right.
Reply With Quote
  #7 (permalink)  
Old 09-08-04, 08:32
gop373 gop373 is offline
Registered User
 
Join Date: Aug 2004
Posts: 77
Thank you very much.It works now !!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On