第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

有關(guān)checkboxlist的問題

有關(guān)checkboxlist的問題

慕仙森 2018-12-06 20:11:30
頁面上3個Checkboxlist控件,Checkboxlist1 中有選中的和未選中的,現(xiàn)要求動態(tài)加載Checkboxlist2和Checkboxlist3中的選項,其中Checkboxlist2中的選項為Checkboxlist1中選中的項,Checkboxlist3中的選項為Checkboxlist1中未選中的項。
查看完整描述

1 回答

?
明月笑刀無情

TA貢獻1828條經(jīng)驗 獲得超4個贊

手動做了個簡單列子,希望有所幫助

前臺

??? <div>
??????? <asp:CheckBoxList AutoPostBack="true" runat="server" onselectedindexchanged="CheckBoxList1_SelectedIndexChanged">
??????? <asp:ListItem Value="1">選中</asp:ListItem>
??????????? <asp:ListItem Value="2">未選中</asp:ListItem>??????
??????? </asp:CheckBoxList>


??????? <asp:Panel runat="server">

??????? </asp:Panel>
??? </div>

后臺

??? protected void Page_Load(object sender, EventArgs e)
??? {

??? }

??? protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
??? {
??????? if (CheckBoxList1.SelectedValue == "1")
??????? {
??????????? CheckBoxList che2 = new CheckBoxList();
??????????? ListItem li = new ListItem("選中的時候", "1");
??????????? che2.Items.Add(li);
??????????? Panel1.Controls.Add(che2);
??????? }
??????? if (CheckBoxList1.SelectedValue == "2")
??????? {
??????????? CheckBoxList che2 = new CheckBoxList();
??????????? ListItem li = new ListItem("未選中的時候", "2");
??????????? che2.Items.Add(li);
??????????? Panel1.Controls.Add(che2);
??????? }
??? }

查看完整回答
反對 回復(fù) 2019-01-21
  • 1 回答
  • 0 關(guān)注
  • 426 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號