I need to pass values between asp.net pages. How do i encrypt those values in the URL? Example : Response.Redirect("customerAdd.aspx?customerId=" + custId);
Check out Mads Kristensen's article for an HttpModule that will encrypt/decrypt all of your querystrings. http://madskristensen.net/post/httpmodule-for-query-string-encryption
His code uses an HttpModule to parses outgoing HTML to encrypt and replace all relative path querystrings. The HttpModule also captures incoming requests and rewrites the request url to use an unencrypted querystring.
The nice part is that you can drop in the module and your code doesn't need to know when the querystrings are encrypted or not. From the code perspective, querystrings work like they always do.
We've been using it for over five years now and it works great.
2.1m questions
2.1m answers
60 comments
57.0k users