URL Rewrite Routine

D

DavidM

Hello -- I have a page that I call with a few URL parameters...

For example:

Parm1=a, Param2=b, Param3=c, Param4=d

The ASP script can accept any number of parameters or none.

Since I'm adding paging to the page via ADO RecordSet and having page
navigation at the bottom, I'm creating a "Previous" and "Next" link which
includes a parameter called "PageNum=" with the correct page #.

The problem is... I need to append the PageNum parameter to the existing
URL. And if the PageNum parameter is already on the URL, then I need to
remove it and replace its value for the correct page.

I assume I can loop thru the QueryString collection and compare name with
value?

Any sample code or help in accomplishing what I'm requesting would be
appreciated.
 
G

Gervin

Put the PageNum as the first parameter in the querystring. Get
request.servervariables("query_string") then just use instr to get the
position of the first ampersand and chop it off with a right(querystring,
len(querystring) - position).
 

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
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top