473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how handle QueryString object

Hello all,

user have in browser address bar this URL:
http://localhost/store/CDfilter.asp?...e=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?...e=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.

Jul 22 '05 #1
3 1793
On Wed, 29 Jun 2005 08:58:48 +0200, "Ing. Branislav Gerzo"
<2G*@NO2geSPAM.us> wrote:
user have in browser address bar this URL:
http://localhost/store/CDfilter.asp?...e=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?...e=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.


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?

Jeff
Jul 22 '05 #2
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]

Jul 22 '05 #3
Gazing into my crystal ball I observed "Ing. Branislav Gerzo"
<2G*@NO2geSPAM.us> writing in
news:16***********************@NO2geSPAM.us:
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.


http://localhost/store/CDfilter.asp?...lngid=3&osid=7
&ordertype=desc&orderby=release_date&PerPage=50&Pa geNum=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=<%=l ngid%>&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
Please respond to the group so others can share
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Samuel Fung | last post by:
Hi all, Can ASP retrieve UTF-8 encoded data in query string properly, when used with IIS 5.0 on Windows 2000 Pro/Server? With some trial and error, it seems that adding the directive...
1
by: boohoo | last post by:
I can't seem to do this: I want to take a query string and place two halves of the querystring into two separate dictionary objects. So... I loop through the collection of querystring items,...
1
by: iam247 | last post by:
Hi I am a relative beginner with SQL and ASP. With some help after previous posts I have a page which successfully requests querystrings from another page and deletes a record from an access...
3
by: Nick | last post by:
I've created a user control that extracts data from a database. The VB code is all contained in a code-behind file. I'm trying to extract a value from the request.querystring but keep getting...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.