Clear Query String

P

prabhu A

I have a page which is called initially with a querystring. After I
get the querystring values,
I don't need the querystring to appear in the url anymore. How can I
get
rid of it? A postback doesn't clear it, it just keeps tagging along.
I
tried Request.QueryString.Clear, but get "readonly" errors.

Thank for your reply if any
Prabhu
 
M

Masudur

prabhu said:
I have a page which is called initially with a querystring. After I
get the querystring values,
I don't need the querystring to appear in the url anymore. How can I
get
rid of it? A postback doesn't clear it, it just keeps tagging along.
I
tried Request.QueryString.Clear, but get "readonly" errors.

Thank for your reply if any
Prabhu


Hi,

Try Redirect to same page with no query string

That is if you redirected from "default.aspx" to "default2.aspx"
like this
Response.Redirect("Default2.aspx?Yahoo=munna");

In default2.aspx in post back try redirect to itself

Response.Redirect("Default2.aspx");

Hope its help...

If your are using any variable from query string...
dont forget to store in viewstate or in session

Thanks
Masudur
kaz Software Ltd.
www.kaz.com.bd
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top