I have a Grid Panel of extension .net control in my web application .Now the grid panel is bind with Store . I have encrypted login user name & the database stores encrypted login name . Now I want the grid panel to show the actual decrypted data in the field . But I have no idea regarding where to decrypt during building of grid data in extension .net controls. Plz help.
Asked
Active
Viewed 500 times
0
-
You mean in the database table you can see data encrypted – Sohail Dec 05 '12 at 15:54
-
1Can't you hook up the RowDataBound event and do it in there? – lintmouse Dec 05 '12 at 16:13
-
1You will probably need to decrypt the data on the server before sending to the client. – geoffrey.mcgill Dec 06 '12 at 00:57
-
I have put encrypted username in Mysql database as well , now I want the grid panel[extension .net controls] to show the decrypted username. – Dec 06 '12 at 06:47
1 Answers
0
Before the datasource of Source was bound, I simply called a for loop of Db data just like a rowbounddata event, & within that I decrypted my column(field) data. At last bind the latest datasource
for (int i = 0; i < this.getUserList(this.getUserFilter()).Count; i++)
{
this.getUserList(this.getUserFilter())[i].LoginName = CommonUtilities.Decrypt(this.getUserList(this.getUserFilter())[i].LoginName, ConfigurationManager.AppSettings["EightCharacterEncryptionKey"]);
}
this.Store1.DataSource = this.getUserList(this.getUserFilter());
this.Store1.DataBind();

j0k
- 22,600
- 28
- 79
- 90