public void loadDate() { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConACC"].ConnectionString); // System.Windows.Forms.MessageBox.Show(summary); try { DataTable dt = AACommon.LoadControl("DATE_FILTER", con, null); for (int i = 0; i < dt.Rows.Count; i++) { txtFrom.Text = dt.Rows[i]["WeekStart"].ToString(); txtTo.Text = dt.Rows[i]["WeekEnd"].ToString(); } } catch (Exception ex) { throw new Exception(ex.Message); //return null; } }