?
Solved

How do I clear request.querystring?

Posted on 2010-01-10
7
Medium Priority
?
938 Views
Last Modified: 2013-11-08
I have a  page which is called initially with a querystring. After I get the querystring values, I don't need the querystring. How do I set querystring null or nothing. Request.QueryString.Clear()
but get "readonly" errors.
Thanks
0
Comment
Question by:chandanchoubey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 11

Accepted Solution

by:
ICaldwell earned 600 total points
ID: 26280195
You can't... The querystring is the data from the URL, for it to go to null or nothing you would need to redirect the user to the same page without parameters passed, this would of course cause the problem where you no longer see the data... Why do you want to clear the data?  It shouldn't cause any problems, this is by design to help you retrieve data....
0
 

Author Comment

by:chandanchoubey
ID: 26280232
Thanks for your response.  My gridview has employee name and date. so when you click on employee name, employee's time sheet is displayed from the date (passed through request.querystring) mentioned. I have another frame, where there is dropdown list of dates. To see employees timesheet, user can select date from the date dropdown too. Since this date dropdown in different frame and page timesheet is always displayed depending on the date earlier passed in querystring. Do you have any suggestion to achieve it.
Thanks for your help.
0
 
LVL 11

Assisted Solution

by:ICaldwell
ICaldwell earned 600 total points
ID: 26280252
Are you using an IFrame for this separate Date Drop down?  why do you have it in a separate frame?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:chandanchoubey
ID: 26280260
the separate frame is navigation frame. Its the way the application is designed, I cant remove the frame.
0
 
LVL 11

Assisted Solution

by:ICaldwell
ICaldwell earned 600 total points
ID: 26280268
You could pass data back and forth between the frames, you could pass the employee data to your date frame, while will then pass it back to your current frame when the date is selected.... Its going to be a pain but thats one way to do it....

Passing data would be done by using the query string, you can pass the user data in a variable....
0
 
LVL 6

Assisted Solution

by:aymoon80
aymoon80 earned 200 total points
ID: 26281060
you can use a ViewState or Session variables or Cookies to avoid depending on any information in the URL.

http://asp.net-tutorials.com/state/cookies/
0
 
LVL 10

Assisted Solution

by:codingbeaver
codingbeaver earned 200 total points
ID: 26288407
The QueryString is read only, so you cannot clear it. But there is a trick you can use to accomplish your task.

Say your page is called ABC.aspx?qs=Something&qs2=SomethingElse, then in Page_Load, you get the values from QueryString, and then save them in Session, then call Response.Redirect("ABC.aspx"). This way use will never get to see the QueryString in the URL.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question