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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.Redirect & Session("ponum") 1

Status
Not open for further replies.

riley3

Programmer
Apr 29, 2004
79
US
Hi,
Would someone take a look at my code and see what I'm missing. I'm trying to redirect from one page to another and take along the value of a Session object to search through a database.

Response.Redirect "poPARTsrch.asp?search=" & Session("ponum")

I've also tried it this way -

Response.Redirect "poPARTsrch.asp?search=Session(""ponum"")"

No luck with either. I've used a lot of Response.Write's to check values along the way and "search" always ends up empty. Session("ponum") always has a number but I'm coming to the search results page from two different pages and I want the results page to have the same input "search". Can I do this?
Thanks,
Riley
 
this is correct...

Response.Redirect "poPARTsrch.asp?search=" & Session("ponum")

on the poPARTsrch.asp page...

you can retrieve it as

myponum=request.querystring("search")

-DNG

 
Thank you very much for the help. I actually used both the Request.Form and the Request.QueryString with a couple of If statements and it's working great. I want to make sure I now which direction I came from.
Riley
 
here is the deal. Lets say your search variable is blah...

now users can come to search results page from two ways...one directly from the form...and one from the other page...

on the search results page...what you have to do is

if request.form("search")<>"" then
blah=session("search")
else
blah=request.form("search")
end if

hope this helps...

-DNG
 
You're right. That's a lot simpler and I’ve been trying to reduce code as much as possible. Thanks again, Riley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top