1.set DropDownList's attribute :
AutoPostBack=true
2.add onchange event
<asp:dropdownlist id="DropDownList1" onchange="change()" runat="server" autopostback="True" >
3.
function change(){
document.getElementById("TextBox1").innerText="1234";
}
the previous code is client scrpit.
Server code :add
SelectedIndexChanged
event
<asp:dropdownlist id="DropDownList1" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" runat="server" autopostback="True" >
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text="1234";
}
http://msdn.microsoft.com/zh-tw/library/system.web.ui.webcontrols.listcontrol.selectedindexchanged.aspx[
^]