473,748 Members | 4,178 Online
Bytes | Software Development & Data Engineering Community
+ 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 1279
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
2750
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 = server.createobject("scriptlet.typelib").guid guid=Left(guid,instr(guid,"}")) genguid=guid
1
2517
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 included. It will diplay any other characters included in the variable though. Code from page 1:
5
1276
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" runat="server"> Sub Page_Load() 'relative connection 'Dim strConnection as String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& _
10
1780
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: http://localhost/page.aspx?year=2000&userid=100 What ways are there to hide everything following the question mark? I have found some tutorials online, but they are very vague and I am seeking a little more detail. As a newbie to asp.net I am interested in...
2
4017
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 querystring but I'm not sure how to pass that value. I get the error that IntCourseID is not declared in: <asp:DropDownList id="fLessonID" runat="server" DataValueField="LessonID" DataSource="<%# GetLessons(IntCourseID) %>"
5
1851
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 button is clicked, check to see if the record exists using input from a form. I want to pass that variable to the button click Sub because if it doesn't exist then the record is inserted and the user is directed to a different page. The variable I'm...
5
1835
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 CNAME = 'MICROSOFT'" This does not work: Dim var as string
10
1873
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. Public Variable Dim myVar as string = Request.querystring("MyVar") End Public Variable
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9534
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8239
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
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 we have to send another system
3
2211
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.