473,474 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Hiding a variable in a querystring

I need to pass a variable in a querystring that I want to hide from the user.
eg www.abc.com?UserID=555 and the UserID must be hidden.

I was thinking of encrypting the ID, using a UserGUID that would change
every night, or passing and an array and index and getting the correct UserID
from that.

Any ideas / suggestions
Craig
Nov 19 '05 #1
2 1268
M
> I was thinking of encrypting the ID,

I think this article is useful for you:

http://www.dotnetjunkies.com/HowTo/9...75836DC72.dcik

by

M
Nov 19 '05 #2
Hi Craig HB,

Just a suggestion: As a design principle, if it's "too secret" to share with
the user, why don't you take it away from the scope of the user and keep it
on the server, perhaps with a special variable in Session that both of these
pages know about? Or even better, why not passing this special variable name
instead of the ID itself in querystring?

I would not recommend encryption because of the overhead. And also consider
the scenario where it's tampered. Your receiving page will find out
eventually that it's tampered and either give out an exception or you'll need
a mechanism to recover it somehow. It just sounds too unnecessary when you
know that you can hide it from the round trip anyway, unless you have a very
good reason.

Hope this gives some ideas,

Ethem
"Craig HB" wrote:
I need to pass a variable in a querystring that I want to hide from the user.
eg www.abc.com?UserID=555 and the UserID must be hidden.

I was thinking of encrypting the ID, using a UserGUID that would change
every night, or passing and an array and index and getting the correct UserID
from that.

Any ideas / suggestions
Craig

Nov 19 '05 #3

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

Similar topics

6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
1
by: Bryan Russell | last post by:
Hi, I'm trying to pass the wildcard variable % to another page via request.querystring. When I go to pick up the variable through request.querystring, it will never diplay the "%" if one is...
5
by: RAW | last post by:
Hi I have a little problem here with my code Iam asp user and Im trying to use vb.net on this proyect Im trying to pass varible to the sql string this is my code <Script language="vb"...
10
by: Shock | last post by:
I am interested in hearing what kind of methods are used to hide QueryStrings when passing data between aspx pages. For instance, I have a url that looks something like this: ...
2
by: Jim via DotNetMonster.com | last post by:
Hi, I'm passing a variable to another page through a querystring. I then want to use that variable to retrieve records from a database to poulate a dropdownlist. I can read the variable from the...
5
by: Jim via DotNetMonster.com | last post by:
Hi, I need to pass the value of a variable from one function to another but I don't seem to get the value. I declare the variable outside all functions. What I'm trying to do is that when the...
5
by: glenn | last post by:
Hi folks, The problem I have is that a query string works if hard-coded but if I pass a variable to it, it does not work as shown here. This works: querystring="SELECT * FROM USERS WHERE...
10
by: Phillip Vong | last post by:
Newbie learning in VB.NET 2. I'm creating a simple ASP.NET 2 page and I pulling a querystring from a link and I want to use this querystring over and over again through out the page. Example....
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.