protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
con.Open();
query = "select * from OA_PlayerBat where Team_ID ='" + ddTeam.SelectedItem + "'";
SqlCommand cmd = new SqlCommand(query, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
grdResult.DataSource = ds;
grdResult.DataBind();
con.Close();
}
this is a drop-down list here user has to select the team to show the results of that team in a grid view.
I have made a stored procedure and i am unable to pass the user selected drop down value there.