Hii swapna!!
you can do insert code as well as you have to re-lode the page on the selection change event of your dropdownlist.
the code will be...like..
confunction();
con.Open();
string quest = "";
MySqlCommand cmd = new MySqlCommand("select que from query where queryname ='" + lbquery.SelectedItem.Text + "' ", con);
MySqlDataReader d = cmd.ExecuteReader();
while (d.Read())
{
quest = d["que"].ToString();
}
con.Close();
///////////////////////////////////////////////coded by shubh//////////////////////////////////////////////////
con.Open();
MySqlCommand cmd1 = new MySqlCommand(quest, con);
MySqlDataAdapter da = new MySqlDataAdapter(cmd1);
DataTable dt = new DataTable();
da.Fill(dt);
GridView2.DataSource = dt;
GridView2.DataBind(); Grid1.Visible = false;
GridView2.Visible = true;
con.Close();
but overall please specify your question that can help me to help you
thanks
Shubham Agrahari
Swapnaidu, if this helps please login to Mark As Answer. | Alert Moderator