Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide querystring parameters in asp.net

Tags:

query-string

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.?

like image 416
Red Swan Avatar asked Feb 04 '26 22:02

Red Swan


2 Answers

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?

like image 188
Dan Iveson Avatar answered Feb 09 '26 09:02

Dan Iveson


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?).

like image 29
Justin Avatar answered Feb 09 '26 07:02

Justin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!