I am looking forward for a method to pass data from page to page safely and avoid as It's possible the tampering.
- The best way to solve it, is to save the sensitive data on db server.
- Or using session persist on db server.
- Or whatever method that persists data on db server.
The fact is because of performance I wouldn't like to use such methods.
I don't know if the following is a safe way, but I would like to test it.( but i don't know if it is possible)
I would like to save the sensitive data in viewstate in encryption mode..for ex in tespage1.aspx and retrieve this from testpage2.aspx.
How can I do this, and is it safe?
Thanks in advance
Create a custom class to hold your sensitive data.
If you are really paranoid include methods for encryption/decryption... Now, set up fields and properties for the data. Next, encrypt (optional). Put the thing in the Cache...
redirect to your other page
In the Page_Load event
That's it, you have your data, if you encrypted it you now need to decrypt it...
There are a multitude of ways to do this but this one works for me with relatively small sets of data. If you are doing large sets of data then you might want to explore using a database such as Sql Sever, mySql, etc... to act as a 'cache' for the data.