/// <summary> /// Helper method to populate list box /// </summary> private void LoadMessages() { // Clear the listbox lstHistory.Items.Clear(); // Get the messages DataTable dt = m_Data.GetMessages(); // Iterate through the records and add them // to the listbox foreach (DataRow row in dt.Rows) { string Msg = string.Format("{0} : {1}", row["Name"], row["Message"]); lstHistory.Items.Add(Msg); } }