Groups | Blog | Home
all groups > inetserver asp general > june 2005 >

inetserver asp general : how handle QueryString object


Ing. Branislav Gerzo
6/29/2005 12:00:00 AM
Jeff Cochran [JC], on Wednesday, June 29, 2005 at 11:09 (GMT) typed
the following:

JC> Are you asking how to best change a query string and resubmit to a new
JC> page, which will create a new query?

this one, sorry for my english.

--

How do you protect mail on web? I use http://www.2pu.net

[Real Men Don't Need Instructions]
Adrienne
6/29/2005 12:00:00 AM
Gazing into my crystal ball I observed "Ing. Branislav Gerzo"
<2GE@NO2geSPAM.us> writing in
news:1621984520.20050629141542@NO2geSPAM.us:

[quoted text, click to view]

http://localhost/store/CDfilter.asp?catid=3&lngid=3&osid=7
&ordertype=desc&orderby=release_date&PerPage=50&PageNum=2

If I were you, I would try to use numerical values for the ordertype and
orderby values, just as the catid, lngid, and osid are. Then build your
sql statement accordingly, eg:

<% select case request.querystring("orderby")
case "1"
sort = " ORDER BY release_date "
case "2"
sort = " ORDER BY ordertype"
case else
sort = " ORDER BY id"
end select

sql = " SELECT values FROM table WHERE clause " & sort
'...
%>

<table summary="CD Filter">
<caption>CD Filter</caption>
<thead>
<th><a href="cdfilter.asp?catid=<%=catid%>&amp;lngid=<%=lngid%>&amp;osid=
<%=osid%>&amp;ordertype=<%=ordertype%>&amp;orderby=1&amp;perpage=<%
=perpage%>&amp;pagenum=<%=pagenum%>">Release Date</a></th>
....
</thead>
<tbody>
<% 'records %>
</tbody>
</table>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Ing. Branislav Gerzo
6/29/2005 8:58:48 AM
Hello all,

user have in browser address bar this URL:
http://localhost/store/CDfilter.asp?catid=3&lngid=3&osid=7&ordertype=desc&orderby=release_date&PerPage=50&PageNum=2

I have on page filter form, and also users should change the order. In
this case it is ordered by release_date desc, but how best handle and
change this url ?

When I print this page to user, I want have on link "sort by release"
have this url:
http://localhost/store/CDfilter.asp?catid=3&lngid=3&osid=7&ordertype=asc&orderby=release_date&PerPage=50&PageNum=2

on "Category" sort by catid and so on.

I'm looking for function Set.QueryString or so.

Now I am doing it - I first parse all arguments, and I'm making the
"new URL" but I don't think it is the best method.

Thanks for any help.
jeff.nospam NO[at]SPAM zina.com
6/29/2005 11:09:44 AM
On Wed, 29 Jun 2005 08:58:48 +0200, "Ing. Branislav Gerzo"
[quoted text, click to view]

Are you asking how to best change a query string and resubmit to a new
page, which will create a new query? Or are you asking the best way
for the user to resort a set of records by the fields in the record?

AddThis Social Bookmark Button