Mark Fenech

Mark Fenech

  • NA
  • 82
  • 69k

Data Bindings

May 2 2011 3:57 PM
I am binding my listbox items with textboxes etc everything works fine except when i refresh stuff and getting error that data source is  already binded etc :/ this is my code any help pls.

                list_event.DataSource = ds.Tables["tblEvents"];
                txt_eventName.DataBindings.Add("text", ds.Tables["tblEvents"], "event_title");
                dateTime_eventTime.DataBindings.Add("text", ds.Tables["tblEvents"], "event_date");
                txt_description.DataBindings.Add("text", ds.Tables["tblEvents"], "event_description");
                txt_eventVenue.DataBindings.Add("text", ds.Tables["tblEvents"], "event_venue");

                label5.DataBindings.Add("text", ds.Tables["tblEvents"], "event_title");
                label6.DataBindings.Add("text", ds.Tables["tblEvents"], "event_venue");
                label7.DataBindings.Add("text", ds.Tables["tblEvents"], "event_date");
                label8.DataBindings.Add("text", ds.Tables["tblEvents"], "event_description");

Answers (4)