Hide querystring

  • Thread starter Thread starter Arjen
  • Start date Start date
A

Arjen

Hi,

Is there a way to hide the querystring?

Now I have URL's like this:
....aspx?name=james&zip=1234

Is there a simple way to read this "name=james&zip=1234" and hide it?
If there are more options, what's the best?

Thanks!
 
Hi Arjen,

You can hide it by always using a form and posting (method=POST instead of
method=GET) to the target page.

But this is not the standard way to do things. Why would you want to hide it?

Cheers,
Tom Pester
 
Here's a nice, simple way to pass values from one page to another:
(VB.NET code)

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

Of course there are a number of ways to pass values from one page to another
besides the querystring there are cookies, session, context, saving to a
temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetbips.com/displayarticle.aspx?id=79
 

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

Back
Top