URL Rewrite Routine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DavidM

    URL Rewrite Routine

    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.




  • Gervin

    #2
    Re: URL Rewrite Routine

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

    [color=blue]
    > 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.
    >
    >
    >
    >[/color]


    Comment

    Working...