D
Dylan Mines
Hi
I'm having an absolute nightmare with this problem.
I have a dropdown list of values that are pulled from my SQL database. I
simply want to select an item and write it to another table when the user
clicks the submit button.
The problem is that the selected item seems to be read after the postback so
when i'm databinding without postback i get a null reference and when i
allow postback the selected item is always the first one in the drop down
list hence it is reading after the Page Load and not maintaing its
viewstate.
I've checked a few references and this is definitely the way to do it.
If i don't pull the values from a DB and just enter an items collection for
the drop down then it works fine.
Has anyone seen this before and can they point me in the right direction to
sort it out?
Thanks,
Dylan
I'm having an absolute nightmare with this problem.
I have a dropdown list of values that are pulled from my SQL database. I
simply want to select an item and write it to another table when the user
clicks the submit button.
The problem is that the selected item seems to be read after the postback so
when i'm databinding without postback i get a null reference and when i
allow postback the selected item is always the first one in the drop down
list hence it is reading after the Page Load and not maintaing its
viewstate.
I've checked a few references and this is definitely the way to do it.
If i don't pull the values from a DB and just enter an items collection for
the drop down then it works fine.
Has anyone seen this before and can they point me in the right direction to
sort it out?
Thanks,
Dylan