• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • Last Modified:

clean up the value of Request.QueryString

Once the page is invoked, i want to clean up the Request.QueryString

Anyone who has an idea how to do, please advise me.

Thankyou in advance
0
LeanMoreTryMore
Asked:
LeanMoreTryMore
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
What do you mean "clean up?"
0
 
LeanMoreTryMoreAuthor Commented:
earse the value which stored in the QueryString
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
reload the page without the value.  QueryString is "Querying" the URL following the "?" - the only way to "clear" it is to get rid of the data after the question mark.  Figure something out to store the variables where you need them or reload the page without using the variables after the "?"
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ajaikumarrCommented:
Hai,

Add this on top of your page

<script language=javascript>
      if ("<%=Request.Querystring()%>" != "") {
            location.href = "<%=Request.ServerVariables("SCRIPT_NAME")%>"
      }
</script>

Bye
Ajai
0
 
craigofcapetownCommented:
instead of posting the form data to the querystring, post them to the HTTP headers...

Your form : ...method="post"
Your form queries : request.form("[field name or id]")

Example :

<%@ language="vbscript" %>

<%

if request.form("hdnSubmit") = "true" then

response.write request.form("txtName")
response.end()

end if

%>

<html>

<body>

<form method="post" action="thispage.asp">

<input type="text" name="txtName" id="txtName">
<input type="hidden" name="hdnSubmit" id="hdnSubmit" value="true">
<input type="submit" value="submit">

</form>

</body>

This way, you will not have to work with a querystring, and therefore not need to use one or clean up after one.

C

</html>
0
 
craigofcapetownCommented:
>This way, you will not have to work with a querystring, and therefore not need to use one or clean up after one.

>C

Thats not supposed to be within the html content...typo

sori

C
0
 
hongjunCommented:
You may try using just JavaScript

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>

<script language="JavaScript">
<!--
     var strQuery;

     strQuery = location.search.substring(1);
     // querystring present
     if ( strQuery != "" ) {
           self.location = location.href.split("?")[0];
     }

//-->
</script>

</HEAD>
<BODY>



</BODY>
</HTML>



hongjun
0
 
craigofcapetownCommented:
...its been more than a month since the last comment was posted. Please do something about this question.
0
 
craigofcapetownCommented:
>...its been more than a month since the last comment was posted. Please do something about this question.

Close the question.
0

Featured Post

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now