DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Removing Query Strings (http://www.daniweb.com/forums/thread6872.html)

Slade Jun 11th, 2004 1:44 am
Removing Query Strings
 
Is there any possible way to remove a query string without redirecting to another page? You see, my problem is I am using panels, when the create new button is clicked, it gives the querystring of "?JobID=New" now when I click on another button (which simply hides the current panel and makes another visible), the query string is still there. I have tried Request.QueryString.Remove and Request.QueryString.Clear but it says it is read only, is there any possible way to remove it?

Slade Jun 11th, 2004 2:37 am
Re: Removing Query Strings
 
I just researched a little. It's not possible :).

stevenng May 15th, 2006 12:43 pm
Re: Removing Query Strings
 
Hi Slade, I found this article that explains exactly what your looking for. It's written in VB.net but I rewrote it in C# if you need it:
http://www.codeproject.com/useritems...g_Argument.asp

Quote:

Originally Posted by Slade
I just researched a little. It's not possible :).


david_bronsky Feb 12th, 2008 1:31 pm
Re: Removing Query Strings
 
Use UrlRewriting

dilipv Feb 13th, 2008 5:44 am
Re: Removing Query Strings
 
hi Slade,
According to me URL rewriting can help in solving your problem. Just check following URL

http://forums.asp.net/p/1217523/2165532.aspx

Hope this will help you.
If problem persist feel free to share with me.
Thanks & Regards
Dilip Kumar Vishwakarma
Programmer
.Net Consulting

SheSaidImaPregy Feb 13th, 2008 10:18 am
Re: Removing Query Strings
 
Yes it is possible Slade.

You need to ask yourself, how did the querystring get there?

A URL is read only yes, so you cannot "edit" it through commands on the server.

Just think about it a bit.. you got the querystring when you submitted the form...


All times are GMT -4. The time now is 4:27 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC