on this site ,點擊時不會引起後背部後回到下拉列表
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.Items.Add("a");
DropDownList2.Items.Add("a");
DropDownList2.Items.Add("b");
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write(DropDownList1.Text);//does not work ????????????
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write(DropDownList2.Text);
}
如何解決這個問題,當點擊item1回發 – ashkufaraz
@GodIsLive看看我更新的答案 – diceler