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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding part of the URL

Status
Not open for further replies.

InternVirtuoso

Programmer
May 20, 2003
21
0
0
US

I pass some information in the URL with the querystring. The problem is that I am afraid that someone is going to change the values of the variables in the URL.

for example:

localhost/example.asp?ID=74

someone could just change the ID number in the URL.


Is there any way to hide part of the URL so that the user doesn't see the ID=74 part, and therefore won't be able to change it manually?

thanks
 
have you consider creating a session("id_field")

user.gif
[sup]
There's never time to do it right, but there's always time to do it over!
[/sup]
 
Can't you post the values to the next page rather than pass them as a querystring?
 
TonyU, are you saying to just make a session variable to hold the information about the ID? I've done that on past pages, but I am concerned about users timing out. Maybe I'll extend the lifetime of session variables and try it out.

But does that mean that there is no way to hide part of the URL?

ca8msm, the previous page posts to itself where it makes sure that the user entered all the necessary information, then I use response.redirect to get to the next page. Is there any way to post and go to another page without pressing a "submit" button?
 
If you use Server.Transfer instead of Response.Redirect you won't have to worry about passing the data agin, you will still have access to it :)

[sub]01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101 [/sub]
[sup]29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19[/sup]
Do you know how hot your home computer is? I do:
 
Rather than the page poting to itself to verify the information could you post to another page to check the information?

This will obviously depend on how you come up with the ID i.e. if you know it before you post it. If you can submit the details to the second page then the ID could be passed through as a hidden variable. If the fields are entered correctly then thats fine otherwise redirect the user back a page.

If you don't know the ID and it is genereated after yuo have posted the form then it would have to be done differently but I'll see what your response is first before going into that.
 
Unfortunately the ID is generated after the form has been posted. Maybe I can do what you suggested and make a second page to sort out the information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top