My recouvrement is when will selected dropdown list that value is stored in my textbox
this is my code """"::::
code
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string db = ConfigurationManager.ConnectionStrings["DDDB"].ConnectionString;
SqlConnection con = new SqlConnection(db);
SqlCommand cmd = new SqlCommand("select id, name,village from gridview ", con);
con.Open();
SqlDataReader rr = cmd.ExecuteReader();
DropDown1.DataTextField = "name";
DropDown1.DataValueField = "id";
DropDown1.DataSource = rr;
DropDown1.DataBind();
con.Close();
Lbl.Text = "connected";
TextBox1.Text = DropDown1.SelectedValue;
}
catch (Exception ex)
{
Lbl.Text = ex.Message;
// Response.Write("");
}
}

Santosh ReddyPosted Jul 2, 2017, 2:44 AM
Vivek KumarPosted Jun 25, 2017, 6:20 PM
Pradeep YadavPosted Jun 25, 2017, 11:37 AM
Guruprakash CPosted Jun 25, 2017, 9:33 AM
Ehsan SajjadPosted Jun 24, 2017, 7:01 PM