tags:

views:

35

answers:

2

How to hide the query string parameter in address bar. i don't want to use View State or session or other state management technique. in my asp.net application. So how can i do this? encryption and decryption is one of but it takes time, and not trusted about its viseversa conversion. Also I tried Get and POST methods. but no impact. how to hide then querystring or its parameters.?

A: 

You can't reliably hide the querystring (unless you perform a redirect after every page, which is definitely not recommended).

If you are dead-set on using the query string then the only thing you can really do is obfuscate the query string - perhaps base 64 encoding the query string do the trick?

I have to ask however, what is it you are trying to solve? (Is this a security issue, or is there another motivation for wanting to hide the query string?).

Kragen
+1  A: 

POST should not append anything to the URL in the address bar.

How is the query string being generated. Is it from a form submission?

Dan Iveson
yes, I have query string in href as well as on form submit
Lalit
If it is part of an HREF attribute then I think you are stuck with it. I think Kragen is right: you need to assess this requirement.
Dan Iveson
ok thats fine , let say I am given the link or query string in button click. then how to hide it?
Lalit
You can't hide the query string unless you submit form data using POST or you can encode it as suggested by Kragen. And you have already ruled out SESSION and VIEWSTATE so I thinnk you are out of options.
Dan Iveson