RE: How to clear parameter out of url

From: Steven Cheng[MSFT] (v-schang_at_online.microsoft.com)
Date: 06/24/04


Date: Thu, 24 Jun 2004 09:24:10 GMT

Hi Moondaddy,

>From your description, one of your ASP.NET web page will checking a certain
querystring parameter in the requested url and do some session operations
depending on the parameter value. And currently you want to remove the
certain parameter from the request url if it exist in the first request, so
that the following postback request won't do the duplicated operations on
the session ,yes?

As far as I know, the QueryString collection of the Request object are not
modifiable by user, and I think you can consider the following means:
1.Still let the querystring param remain in the url and use the
Page.IsPostBack property to check whether its the first time loaded or post
back request so as to determine whether to do the session modification or
not.

2. User Server.Transfer or response.Redirect to reload the current page
with the non-querystring url. But this will reduce the performance.

Please have a consider on the above things. If you have any other different
ideas, please also feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx



Relevant Pages

  • Re: Change url of supplied page without doing a redirect?
    ... I would use post instead of get, but posting from another ... I guess the other option is session ... > certain parameter from the request url if it exist in the first request, ... > As far as I know, the QueryString collection of the Request object are not ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to clear parameter out of url
    ... its performance hit by running the logic in the Page_Init method before the ... > querystring parameter in the requested url and do some session operations ... > certain parameter from the request url if it exist in the first request, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Change url of supplied page without doing a redirect?
    ... querystring parameter in the requested url and do some session operations ... certain parameter from the request url if it exist in the first request, ... the QueryString collection of the Request object are not ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A Very Simple BHO
    ... The requested URL could not be retrieved ... While trying to retrieve the URL: ... Unable to forward this request at this time. ... All configured parent caches are currently unreachable. ...
    (microsoft.public.vc.mfc)
  • Re: Poor little puppy
    ... > The requested URL could not be retrieved ... > While trying to retrieve the URL: ... a 403 Forbidden error was encountered while trying to ... use an ErrorDocument to handle the request. ...
    (uk.people.silversurfers)