public void binddata() { try { string username = Convert.ToString(Session["username"]); DateTime today = DateTime.Now; ds = obj.GetAppointment(username); if (ds != null) { GridView1.DataSource = ds; GridView1.DataBind(); } else { } } catch (Exception e) { } }