Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear querystring in browser

Status
Not open for further replies.

testare

Programmer
Jan 21, 2005
127
If i use this code below, in my browser the address would be like this admin.asp?action=login

I want to clear the the querystring after it has finish the page or something else in the browser address link
Code:
<form action="admin.asp?action=login" method="Post">
 <input class="FormPassword" type="password" name="password" value="demo">
 <input type="submit" value="Logga in"><br>
</form>
<%	
If Request.QueryString("action") = "login" Then
	Response.Write("Just testing")
End If
%>

I hope you understand what i mean.
 
did not complete understand...you can do a response.redirect


-DNG
 
i tried typing Response.Redirect("admin.asp") after the end if and it seems that it keep redirecting to it self, like an infinite loop.

What should i type DNG?
 
can you please explain again what you are actually trying to do.

-DNG
 
Try:

If Len(Request.QueryString("")) > 0 Then
Response.Redirect("admin.asp")
End If

Lee
 
the example code that i have at my first post for example

If i press the submit button, then the address on my webbrowser would be admin.asp?action=login

I would like to that when i press the submit button, that after it has gone in to the querystring action=login.
clear the address in the webbrowser so that the address in the webbrowser should be admin.asp

If it works with response.redirect and would use it
 
<form action="admin.asp?action=login" method="Post">
<input class="FormPassword" type="password" name="password" value="demo">
<input type="submit" value="Logga in"><br>
</form>
<%
If Request.QueryString("action") = "login" Then
Response.Write("Just testing")
End If
Response.Redirect("admin.asp")
%>

Once i press the submit button it will just loop sand never get out of it, i'm i right?
 
I have tried with your solution but it doesn't help.

<%
If Request.QueryString("action") = "login" Then
Response.Write("Just testing")
End If
If Len(Request.QueryString("")) > 0 Then
Response.Redirect("admin.asp")
End If
%>

Is this where i should put your code?

because in my website it is still admin get at my address bar admin.asp?action=login
 
I'm really sorry.
I've put the response.redirect under end if.
Thanx for the help.
 
Hi All,

I am having a problem with sending a querystring in an ASP page. Here's my code:

<form enctype="multipart/form-data" Action="GetUpload.asp?hdept=savpath" method="Post" id="form1" name="form1">

My problem is that the querystring value 'savpath' is actually a JavaScript variable field and not a literal. I need the value within the 'savpath' field to be passed to the next ASP page. How can I accomplish this? Everytime I try something the receiving page shows me 'savpath' as the querystring value, not the contents of 'savpath'.

Thanks.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top