T
Thomas Kern
Hi everybody!
I have a dropdownlist on a aspx page. The dropdownlist is filled in the
page_load event like this:
If Not Page.IsPostBack Then
BindData()
End If
The Bind Data method goes to the database and reads the values for the
dropdownlist. In addition it selects the appropriate value:
ddlKind.SelectedValue = row.FK_KIND 'row.FK_KIND is from another table
ddl.DataBind()
This works fine!
Now I implemented the possibility for users to change information and save
it. This is where my problems occur after the user hits the "Save" button my
save event does the changes to the data. In the end i call the BindData()
method again to repopulate everything.
But this time the ddlKind does not get selected appropriate. It always
selects the first entry! Although in the debugger I can see that
ddlKind.SelectedValue is set to the correct value.
Any ideas what I might do wrong?
Thanks for help.
rgds,
tom
I have a dropdownlist on a aspx page. The dropdownlist is filled in the
page_load event like this:
If Not Page.IsPostBack Then
BindData()
End If
The Bind Data method goes to the database and reads the values for the
dropdownlist. In addition it selects the appropriate value:
ddlKind.SelectedValue = row.FK_KIND 'row.FK_KIND is from another table
ddl.DataBind()
This works fine!
Now I implemented the possibility for users to change information and save
it. This is where my problems occur after the user hits the "Save" button my
save event does the changes to the data. In the end i call the BindData()
method again to repopulate everything.
But this time the ddlKind does not get selected appropriate. It always
selects the first entry! Although in the debugger I can see that
ddlKind.SelectedValue is set to the correct value.
Any ideas what I might do wrong?
Thanks for help.
rgds,
tom