PDA

Click to See Complete Forum and Search --> : binding of hidden textbox


escape0
Dec 12th, 2002, 10:21 AM
hi all...

i've problems with a hidden textbox (property visible=false).

when i bind the textbox to a db-field it is not filled with data. the textbox gets the value from a functioncall and should not be visible to the user. when i set visible=true it works...

is it possible to bind a variable to a db-field or are there other solutions how to do this?

thanks
robert

Edneeis
Dec 12th, 2002, 10:33 AM
If its not visible why bind it? Can't you just get the data from the datasource directly?

escape0
Dec 12th, 2002, 10:37 AM
i have two textboxes:

txtPasswordDecrypted
txtPasswordEncrypted

the user can only modify the textbox txtPasswordDecrypted... the TextChanged-Event calls a function which encryptes the text in txtPasswordDecrypted and puts it into the field txtPasswordEncrypted which should be stored in the db.

Edneeis
Dec 12th, 2002, 10:42 AM
So can't you just get the encrypted text from the datasource, then decrypt it and show it in the textbox without binding. Then when the record changes or the data is 'saved' just encrypt it back directly in the datasource?

What is the datasource? A dataset? Class?

escape0
Dec 12th, 2002, 10:48 AM
the datasource is a dataset... you are right - i can do this without binding.

thank you for your help