string sql1 = @"Select * from Meeting where meeting_id = {0}"; DataTable dt = DBUtl.GetTable(sql1, TxtMeetingID.Text); if (dt.Rows.Count == 1) { //populate the form = retrieve value from DataTable TxtDate.Text = String.Format("{0:yyyy-MM-dd}", dt.Rows[0]["date"]); DrpRoom.SelectedValue = dt.Rows[0]["room_id"].ToString(); DrpPax.SelectedValue = dt.Rows[0]["attendees_pax"].ToString(); ti.Value = dt.Rows[0]["start_time"].ToString(); to.Value = dt.Rows[0]["end_time"].ToString(); } else { LtlMsg.Text = "Meeting ID not found – please try again."; } }
An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code Additional information: Input string was not in a correct format.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)