Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > how handle QueryString object

Reply
Thread Tools

how handle QueryString object

 
 
Ing. Branislav Gerzo
Guest
Posts: n/a
 
      06-29-2005
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.

 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      06-29-2005
On Wed, 29 Jun 2005 08:58:48 +0200, "Ing. Branislav Gerzo"
<> 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
 
Reply With Quote
 
 
 
 
Ing. Branislav Gerzo
Guest
Posts: n/a
 
      06-29-2005
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]

 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      06-29-2005
Gazing into my crystal ball I observed "Ing. Branislav Gerzo"
<> writing in
news::

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Handle # sign in url/querystring David C ASP .Net 2 04-07-2008 03:30 PM
How to get value of QueryString inside QueryString Mehdi ASP .Net 6 04-06-2006 03:41 PM
Passing QueryString URL as a paremeter in QueryString Adeel Ahmad ASP General 1 03-07-2006 02:05 PM
Does Request.QueryString handle UTF-8 data? Samuel Fung ASP General 0 05-19-2004 11:45 PM



Advertisments