Hi, i have a formview on my page which has a password field. I encrypt the password when i store it in the database so what i need to do is decrypt it on the display before they edit. I have tried doing:
<asp:TextBox ID="txtPassword" runat="server" Text='<%# Encryption.Decrypt(Bind("Password")) %>'></asp:TextBox>
but this returned the error:
"The name 'Bind' does not exist in the current context"
Even when i try doing:
<asp:TextBox ID="txtPassword" runat="server" Text='<%# Encryption.Decrypt(Eval("Password")) %>'></asp:TextBox>
I get the error:
The best overloaded method match for 'Encryption.Decrypt(string)' has some invalid arguments
Argument '1': cannot convert from 'object' to 'string'
but the second method wouldn't help anyway because i need to pass it back to the objectdatasource to do the update.
Appreciate if someone could help.
Thanks
<asp:TextBox ID="txtPassword" runat="server" Text='<%# Encryption.Decrypt(Bind("Password")) %>'></asp:TextBox>
but this returned the error:
"The name 'Bind' does not exist in the current context"
Even when i try doing:
<asp:TextBox ID="txtPassword" runat="server" Text='<%# Encryption.Decrypt(Eval("Password")) %>'></asp:TextBox>
I get the error:
The best overloaded method match for 'Encryption.Decrypt(string)' has some invalid arguments
Argument '1': cannot convert from 'object' to 'string'
but the second method wouldn't help anyway because i need to pass it back to the objectdatasource to do the update.
Appreciate if someone could help.
Thanks