[請益] 請問ASP.NET Autopost的問題
我將checkboxlist、radiobuttonlist、dropdownlist、listbox使用AutopostBack屬性,
變換選取項目後將文字顯現在literal上,但dropdownlist跟listbox沒有將文字顯示在
literal上,但若將該兩項用button點選便有顯示在literal上,想請教大大這是什麼緣故
我是用Visual studio 2005編譯的
protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
this.Literal1.Text = this.CheckBoxList1.Text;
}→literal有顯示出來
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
this.Literal1.Text = this.RadioButtonList1.Text;
}→literal有顯示出來
protected void Button1_Click(object sender, EventArgs e)
{
this.Literal1.Text = this.DropDownList1.SelectedValue;
}→literal有顯示出來
protected void Button2_Click(object sender, EventArgs e)
{
this.Literal1.Text = this.ListBox1.Text;
}→literal有顯示出來
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
this.Literal1.Text = this.DropDownList1.Text;
}→literal無顯示
protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.Literal1.Text = this.ListBox1.SelectedValue;
}→literal無顯示
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.223.243.227
推
08/30 01:31, , 1F
08/30 01:31, 1F
C_Sharp 近期熱門文章
PTT數位生活區 即時熱門文章