没懂起意思,说详细点
获取显示的Text:Label1.Text = this.DropDownList1.Text;
获取选中的值:Label1.Text = this.DropDownList1.SelectedValue;
下拉列表不是有事件吗,在事件里面写,然后赋给指定的label
HTML代码:
<asp:DropDownList ID="DropDownList1" runat="server"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList>
CS代码:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
this.Label1.Text = this.DropDownList1.SelectedItem.Value; //绑定值 value
this.Label1.Text = this.DropDownList1.SelectedItem.Text; //显示值 text
}
楼上正解
这么简单地问题就不要在这里问了,百度一下就好了