When a postback occurs on my page, changes are made in my database and I want those changes to be reflected in my ListBox. It has a datasource that is set up in the .aspx side of things (DataSource = "myDataSource"). Right now, on a postback, these changes are not visible. How can I "Rebind" my ListBox?
Asked
Active
Viewed 994 times
1 Answers
2
try this :
In your event handler that is causing the postback try adding this at the end (say Button1_Click if it a postback caused by a button)
ListBox1.DataBind();
it should cause the datasource to refresh.

Pankaj Kumar
- 1,748
- 6
- 28
- 41