QueryString Hiding

S

Shock

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 learning
all I can about securing the data I am transferring between pages.

Currently, I pass the data in the url exactly like it is above and I use a
function on the other end to extract the variable from the data and put it
into a private variable on the next page.

Thanks ahead!

Shock
 
T

Teemu Keiski

Hi,

you could use Session variables when values are kept in memory for user's
session (at server). Another way could be using cookies (they are readable
if user really wants that but work for 'quick' hiding) or just using
Server.Transfer, when processing of request is transferred to another page
at the server without client browser intervention. Server.Transfer works
like Response.Redirect but the exact difference is that redirect happens
without client browser knowing that (with Response.Redirect browser is
making the actual redirect request).
 
C

Cor Ligthert

Hi Shock,

In addition to Teemu, which gives you the ASPX answer, you can also look at
the Post and Get which are used in ASP (what you are using now).

As far as I remember me are you now using the Get method while the Post hide
also.

Cor
 
T

Tommy

On the source page, create a form with a hidden field. Store your
QueryString in the hidden field, and post this form to the target
page. This way you can transfer data from the source page to the
target page without using the QueryString.

Tommy,
 
K

Kevin Spencer

That only hides it from the browser address bar. It doesn't keep the values
out of the HTML of the form. The only way to assure that nobody will see the
information is to hold it on the server side, or to encrypt it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
K

Kevin Spencer

That would do it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
C

Cor Ligthert

Hi Shock

Have a look at the message from Teemu, for me this is a horse before a
Ferrari.

Cor
 
S

Shock

Cor Ligthert said:
Hi Shock

Have a look at the message from Teemu, for me this is a horse before a
Ferrari.

Cor

I am going to look more into that. I am pretty new to asp.net and I don't
have a reference yet so I am blurry on a lot of the details. If you have
any code that could clarify his explanation I would greatly appreciate it.

Thanks!

Shock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top