cadwalli
Active member
Hi
I have a form in aspx (code in vb.net) which has several bits of information which i write back to a database table.
Most of these fields are text fields.
However, I also have a couple of combo boxes which at the moment I write back to the db using e,g.:
dbfield = dropdown1.text
then when i load the data back in to the form i use:
dropdown1.text = dbfield
However, is this the safest way to do it? what if the text values on the forms change.
Should i be writing dropdown1.value back to the table instead as that would always be constant, i.e. if my combo had value "OPEN" and text "OPEN-TICKET" and i changed the text to "OPEN" only then the value OPEN would still be valid.
I know this sounds like an obvious question but I dont seem to be able to get things to work if i use the value.
Am i missing something.
Thanks in advance.
Ian
I have a form in aspx (code in vb.net) which has several bits of information which i write back to a database table.
Most of these fields are text fields.
However, I also have a couple of combo boxes which at the moment I write back to the db using e,g.:
dbfield = dropdown1.text
then when i load the data back in to the form i use:
dropdown1.text = dbfield
However, is this the safest way to do it? what if the text values on the forms change.
Should i be writing dropdown1.value back to the table instead as that would always be constant, i.e. if my combo had value "OPEN" and text "OPEN-TICKET" and i changed the text to "OPEN" only then the value OPEN would still be valid.
I know this sounds like an obvious question but I dont seem to be able to get things to work if i use the value.
Am i missing something.
Thanks in advance.
Ian