Hi, I have created a custom user control that includes a dynamically
created drop down list populated with data from a database.
The control class contains a BindList routine that is used to populate
the dropdownlist. This function works fine and I call it from within
the CreateChildCont rols() routine.
I also have another routine which allows a user to delete an item from
the list by clicking on a Delete button (Again created dynamically
within the CreateChildCont rols() routine)
My problem is that while an item is deleted from the database (A user
selects an item from the dropdownlist and presses the delete button)
when the page is shown again the deleted item still appears in the
drop list even though the item no longer exists in the database.
I have set the enableViewState property of the dropdownlist to false
and have tried clearing the dropdownlists items before calling the
BindData function but the deleted item still appears.
I am pretty sure that the problem occurs because of the way the
CreateChildCOnt rols routine is called but can't seem to nail it :)
Thanks in advance
Mark
created drop down list populated with data from a database.
The control class contains a BindList routine that is used to populate
the dropdownlist. This function works fine and I call it from within
the CreateChildCont rols() routine.
I also have another routine which allows a user to delete an item from
the list by clicking on a Delete button (Again created dynamically
within the CreateChildCont rols() routine)
My problem is that while an item is deleted from the database (A user
selects an item from the dropdownlist and presses the delete button)
when the page is shown again the deleted item still appears in the
drop list even though the item no longer exists in the database.
I have set the enableViewState property of the dropdownlist to false
and have tried clearing the dropdownlists items before calling the
BindData function but the deleted item still appears.
I am pretty sure that the problem occurs because of the way the
CreateChildCOnt rols routine is called but can't seem to nail it :)
Thanks in advance
Mark