protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { DropDownList1.DataSource = ds; DropDownList1.DataTextField = "ItemName" DropDownList1.DataValueField = "Price"; DropDownList1.DataBind(); } } protected void DropDownList1_OnSelectedIndexChanged(object sender, EventArgs e) { TextBox1.Text = DropDownList1.SelectedValue; }
AutoPostback must be true
Róhãn Lëuvä
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)