saving a query string

S

shank

I have a search page with 7 different field options to search upon. The user
can use any or all options. On the results page I'd like to put at the top
of each column and ASC and DESC link to resort the results in the user's
choice. How do I save that original query string to reuse in the sort links?
My results could spread across many pages, so I'm guessing that I would have
to query the database again for each sort.

thanks!
 
R

Ray at

<%
sQuerystring = Request.Querystring
If Request.Querystring("order") = "descending" Then sQuerystring =
Replace(sQuerystring, "&order=descending", "order="ascending")
%>

<a href="thispage.asp?<%=sQuerystring%>">View in the other order</a>

Ray at work
 
T

TomB

May want to keep the query out of the Query string. A noisy parker like me,
might change it.
You could store it in a Session variable, or a hidden form field (POSTed not
GETted)

Tom B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,814
Members
47,359
Latest member
Claim Bitcoin Earnings. $

Latest Threads

Top