Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a dropdownlist which i am populating using visual studio extender i want to populate a textbox from that dropdownlist? how do i do that ?
Posted

1 solution

What ever said in the above solution is correct but there is noneed of accessing the database one more as we are having the required value in the dropdown list itself.

so the dropdown list event handler can be modified like this.


C#
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
       TextBox1.Text=DropDownList1.SelectedItem.Value.ToString();
    }

If you are need of more information related to the user selection then you can access the database one more time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900