Zarcom,
You said,
"For security reasons I don't want someone to be able to "View Source" and find out the value of the old password.
Thanking you for help"
How secure? View state is by default
NOT SECURE. It can be decoded by the receiver regardless of https because the receiver is on the decoded side of https. You must specifically request
Tamper proofing AND encryption.
Its is base-64 encoded (
not encrypted) to stay within a well defined ASCII range which will survive ASCII/UTF-8/UTF-16 and back etc transformations etc.
From MSDN January 2002 MSDN CD.
"Taking a Bite Out of ASP.NET ViewState"
Making ViewState More Secure
Because it's not formatted as clear text, folks sometimes
assume that ViewState is encrypted—it's not. Instead,
ViewState is merely base64-encoded to ensure that values are not altered during a roundtrip, regardless of the response/request encoding used by the application.
There are two levels of ViewState security you may wish to add to your application:
Tamper-Proofing
A hashcode will not secure the actual data within the ViewState field, but it will greatly reduce the likelihood of someone tampering with ViewState to try to spoof your application, that is, posting back values that your application would normally prevent a user from inputting.
You can instruct ASP.NET to append a hashcode to the ViewState field by setting the EnableViewStateMAC attribute:
<%@Page EnableViewStateMAC=true %>
EnableViewStateMAC can be set at the page or application level. Upon postback, ASP.NET will generate a hashcode for the ViewState data and compare it to the hashcode store in the posted value. If they don't match, the ViewState data will be discarded and the controls will revert to their original settings.
By default, ASP.NET generates the ViewState hashcode using the SHA1 algorithm. Alternatively, you can select the MD5 algorithm by setting <machineKey> in the machine.config file as follows:
"
<machineKey validation="MD5" />
Encryption
You can use encryption to protect the actual data values within the ViewState field. First, you must set EnableViewStatMAC="true", as above. Then, set the machineKey validation type to 3DES. This instructs ASP.NET to encrypt the ViewState value using the Triple DES symmetric encryption algorithm.
<machineKey validation="3DES" />
Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript