here is my code on button click please check the attachment below
--------------------------------------------------------------
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString))
{
using (SqlCommand cmd = new SqlCommand("SELECT * FROM [piechart] where Date BETWEEN '" + txtDate.Text + "' AND '" +txtDate1.Text + "'"))
{
using (SqlDataAdapter sda = new SqlDataAdapter())
{
cmd.Connection = con;
sda.SelectCommand = cmd;
using (DataTable dt = new DataTable())
{
sda.Fill(dt);
// GridView1.DataSource = dt;
GridView1.DataBind();
}
}
}
}
----------------------------------------------
Vincent Maverick DuranoPosted May 19, 2016, 11:55 AM
Rajeesh MenothPosted May 19, 2016, 5:57 AM