SqlCommand cmd = new SqlCommand("insert into contact_us (Name,Email_id,Mobile_no,Comments, entry_date ) values('"+TextBox1.Text+"','"+TextBox2.Text+"','"+TextBox3.Text+"','"+TextBox4.Text+"', '"+System.DateTime.Today.ToShortDateString() +"' )",con);
SqlDataReader dr = cmd.ExecuteReader();
con.Close();
for fetching:
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select Name as'Name', Email_id as 'Email Id',Mobile_no as 'Mobile No',Comments as 'Comment', CONVERT(VARCHAR(20),entry_date,111) from contact_us", con);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
GridView1.DataSource = dt;
GridView1.DataBind();