473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Clearing QueryString

I have only one page.Its a search results page.Depending on the component
selected in the results page the search is initiated. I am using QueryString
to send me details pertinent to search.But I need to have it cleared and not
retain the values when its posted back.
Can somebody throw some insight as to how to achieve this.
Nov 19 '05 #1
5 1452
I need to maintain the ViewState.

"Vishwanathan Raman" wrote:
I have only one page.Its a search results page.Depending on the component
selected in the results page the search is initiated. I am using QueryString
to send me details pertinent to search.But I need to have it cleared and not
retain the values when its posted back.
Can somebody throw some insight as to how to achieve this.

Nov 19 '05 #2
It sounds like you don't want to use a QueryString to send you the Details.
Using a QueryString is handy if you want the user to be able to bookmark the
page, to save a search, for example. If you don't want the parameters in the
QueryString, it's better to send them via Form Post.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Vishwanathan Raman" <Vi***************@discussions.microsoft.com> wrote in
message news:26**********************************@microsof t.com...
I have only one page.Its a search results page.Depending on the component
selected in the results page the search is initiated. I am using
QueryString
to send me details pertinent to search.But I need to have it cleared and
not
retain the values when its posted back.
Can somebody throw some insight as to how to achieve this.

Nov 19 '05 #3
"Vishwanathan Raman" <Vi***************@discussions.microsoft.com> wrote in
message news:A9**********************************@microsof t.com...
I need to maintain the ViewState.


In which case, why don't you view the ViewState object instead...?
Nov 19 '05 #4
Yes I want the QueryString to send me the details but then I need to clear it
before I present the page otherwise the application will re read the same
parameters in the next postback.

Regards

"Kevin Spencer" wrote:
It sounds like you don't want to use a QueryString to send you the Details.
Using a QueryString is handy if you want the user to be able to bookmark the
page, to save a search, for example. If you don't want the parameters in the
QueryString, it's better to send them via Form Post.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Vishwanathan Raman" <Vi***************@discussions.microsoft.com> wrote in
message news:26**********************************@microsof t.com...
I have only one page.Its a search results page.Depending on the component
selected in the results page the search is initiated. I am using
QueryString
to send me details pertinent to search.But I need to have it cleared and
not
retain the values when its posted back.
Can somebody throw some insight as to how to achieve this.


Nov 19 '05 #5
It won't re-read the QueryString during PostBack if you don't tell it to.
That is, check for IsPostBack prior to reading the QueryString.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Vishwanathan Raman" <Vi***************@discussions.microsoft.com> wrote in
message news:78**********************************@microsof t.com...
Yes I want the QueryString to send me the details but then I need to clear
it
before I present the page otherwise the application will re read the same
parameters in the next postback.

Regards

"Kevin Spencer" wrote:
It sounds like you don't want to use a QueryString to send you the
Details.
Using a QueryString is handy if you want the user to be able to bookmark
the
page, to save a search, for example. If you don't want the parameters in
the
QueryString, it's better to send them via Form Post.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Vishwanathan Raman" <Vi***************@discussions.microsoft.com> wrote
in
message news:26**********************************@microsof t.com...
>I have only one page.Its a search results page.Depending on the
>component
> selected in the results page the search is initiated. I am using
> QueryString
> to send me details pertinent to search.But I need to have it cleared
> and
> not
> retain the values when its posted back.
> Can somebody throw some insight as to how to achieve this.


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Arpan | last post by:
A link has the following URL: <a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%= Request.QueryString("cadd1") %>&cadd2=<%= Request.QueryString("cadd2") %>&cplace=<%=...
1
by: lion | last post by:
my Problem: a query string passed into a html page doesn't display correctly on a mac I am just using html and javascript (no ASP, PHP or server side scripting) This is the query string:...
3
by: Jon | last post by:
Hi, I have hyperlink objects in a datagrid that redirect the user back to the current page with this syntax: <a href="mypage.aspx?id=foo"> When the page reloads, code in Page_Load then takes...
4
by: Raterus | last post by:
Howdy, Simple question, but I can't figure out how to do it. I have a a page which is called initially with a querystring. After I get the querystring values, I don't need the querystring to...
12
by: Alex | last post by:
I have a question about determining if one QueryString keys exists. The idea is, if this key exists, than its presence is enough to indicate that its value is true. For example ... ...
5
by: Davids | last post by:
when using the page to POST (from a form) I want the page's querystring to be cleared, how do I do that?
3
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so...
7
by: PJ6 | last post by:
I thought this was going to be simple. I want to take an HttpRequest and add an item to the QueryString. First I tried to add it directly, but I got a "Collection is read-only." error. So I...
3
by: pingsheng | last post by:
Dear all, I have a form with dynamically created input fields. These fields go to next page for submitting into SQL database. The thing is all fields are the same but 4 fields. So each record...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.