I have two listviews, ListView1 and ListView2. After insterting (and deleting / updating) a record in ListView1 I need to refresh a DropDownList in ListView2 with the new database values.
I have tried to do a DataBind() on the InsertedItem event but get the following error:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
Here's the code for the databind if it helps
Thanks in advance for any help
Web Development Manager
I have tried to do a DataBind() on the InsertedItem event but get the following error:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
Here's the code for the databind if it helps
Code:
Sub Update_ddl(ByVal sender As Object, ByVal e As ListViewInsertedEventArgs)
Dim ddl As new DropDownList
ddl = ListView2.InsertItem.FindControl("DropDownList1")
ddl.DataBind()
end sub
Thanks in advance for any help
Web Development Manager