Hi..
I have 3 DropDownList:-
DropdownList1 has status,DropDownlist2 has date and DropDownList3 has duedate and based on these values selected i want to populate the Gridview following is my code..
protected void Button1_Click(object sender, EventArgs e)
{
string con = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlDataAdapter sda = new SqlDataAdapter("Select * from DropDownFilter where status='" + DropDownList1.SelectedValue + "' and date='" + DropDownList2.SelectedValue + "' and duedate='" + DropDownList3.SelectedValue + "'", con);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
But unable to achieve it,can anyone please guide me??