Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
getting data between two dates
sandeep sandy
May 19 2016 4:57 AM
230
Reply
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();
}
}
}
}
----------------------------------------------
Attachment:
Untitled.zip
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
not firing dropdownlist without autopostback
how to create butt in C#