http://www.domain.com/sear
What do you mean by building contents of the variables?
Is it something like the ISAPI_Rewrite system?
Thanks
Main Topics
Browse All Topicshi Experts.
I am trying to find a code that could hide variables that are blank. In other words, I am using search pages and passing all the variables to page 2, 3 etc when moving to next page results.
What I would like to do is ignore any variables that are empty or not being used to keep the url as short as possible when moving between pages.
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
http://www.domain.com/sear
What do you mean by building contents of the variables?
Is it something like the ISAPI_Rewrite system?
Thanks
Tony-laptops,
In ASP you can test to see if the variable is blank by using some code like this to build your string.
strquery = "?page=2"
If s <> "" then strquery = strquery & "&s=" & s
And then repeat for the other variables and values. They are only added if not blank.
Let me know if you have any questions or need more information.
b0lsc0tt
yea, it's long code....
but basically you do something like this.
nexturl="http://www.myserv
firsttime=0 ' keep track of the ? so you can pass no variables
*********-begin repeating code*********
if variable1<>"" then
if firstime=0 then
nexturl=nexturl&"?variable
else
nexturl=nexturl&"&variable
end if' ? or &
end if ' variable 1
******* end repeating code********
simply repeat that until you've checked all your variables.
If you want to get fancy smancy you can make it a subroutine (i.e. if you have alot of these to do)
nexturl="http://www.myserv
firsttime=0 ' keep track of the ? so you can pass no variables
sub checker()
if variable1<>"" then
if firstime=0 then
nexturl=nexturl&"?variable
else
nexturl=nexturl&"&variable
end if' ? or &
end if ' variable 1
end sub
response.redirect("nexturl
If you need more specific stuff ask. :)
then call it as
checker variable1
checker variable2
Business Accounts
Answer for Membership
by: angelIIIPosted on 2006-10-31 at 13:03:23ID: 17845377
you can build up your url based on the contents of the variables, of course.
how do you call the other pages?
what is your current code?