D
dm_dal
I have a control on my webform that I am binding to a dataset. The issue
is, the field value in the dataset is encrypted and I am trying to decrypt
it during the binding process:
Example:
<asp:Lable ID="myLable Text='<%#
myComponent.Decrypt(DataBinder.Eval(myDataSet,
"Tables[MyTable].DefaultView.[0].MyField")) '></asp:Label>
This fails with the message : Compiler Error Message: CS1502: The best
overloaded method match for MyComponent.Decrypt(string)' has some invalid
arguments.
From what I've read, the DataBinder.Eval() does return a string value?
I can tell the decryption component works, because if I use the following in
my code behind:
myLable.Text = MyComponent.Decrypt(myDataSet.MyTable[0].MyField)
The decryption works and the data is displayed as desired.
Is it possible to do what I'm attempting? or, Should I simply give up and
use the code behind method?
I'd like to get this working, because I have other controls that I would
like to do some formatting on before I display on the web form.
David
is, the field value in the dataset is encrypted and I am trying to decrypt
it during the binding process:
Example:
<asp:Lable ID="myLable Text='<%#
myComponent.Decrypt(DataBinder.Eval(myDataSet,
"Tables[MyTable].DefaultView.[0].MyField")) '></asp:Label>
This fails with the message : Compiler Error Message: CS1502: The best
overloaded method match for MyComponent.Decrypt(string)' has some invalid
arguments.
From what I've read, the DataBinder.Eval() does return a string value?
I can tell the decryption component works, because if I use the following in
my code behind:
myLable.Text = MyComponent.Decrypt(myDataSet.MyTable[0].MyField)
The decryption works and the data is displayed as desired.
Is it possible to do what I'm attempting? or, Should I simply give up and
use the code behind method?
I'd like to get this working, because I have other controls that I would
like to do some formatting on before I display on the web form.
David