Re: How to clear parameter out of url
From: John Saunders (johnwsaundersiii_at_notcoldmail.com)
Date: 06/28/04
- Next message: John Saunders: "Re: Application[] and Session[]"
- Previous message: Darren Clark: "Re: How to Set a field to get focus on startup"
- In reply to: moondaddy: "How to clear parameter out of url"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 27 Jun 2004 21:24:27 -0400
"moondaddy" <moondaddy@nospam.com> wrote in message
news:%23gq%23M7aWEHA.4092@TK2MSFTNGP11.phx.gbl...
> I'm passing a parameter in the url when I open up a particular page. When
> the page loads and finds this parameter, I know that I need to clear a
> variable out of the session cache and reset it with a new value. On the
> following postbacks I want this variable to remain constant which means I
> need to clear the parameter out of the URL before any of the postbacks
> occur. Otherwise if this parameter is still in the URL when the page
loads
> from a postback, it will clear out the variable again.
>
> is there a way to alter the pages current URL?
If you only need that query parameter the first time you open the page, then
you should only check it on the first request. Use:
If Not Page.IsPostBack Then
If Request.QueryString("onceonly") = "doThisOnce" Then
...
End If
End If
-- John Saunders johnwsaundersiii at hotmail
- Next message: John Saunders: "Re: Application[] and Session[]"
- Previous message: Darren Clark: "Re: How to Set a field to get focus on startup"
- In reply to: moondaddy: "How to clear parameter out of url"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|