最近想做一个COMBOX选择后,另外一个SELECBOX加载不一样的内容
前台
<DirectEvents> <BeforeSelect OnEvent="cbtype_change" ></BeforeSelect> </DirectEvents>后台
protected void cbtype_change(object sender, DirectEventArgs e) { if (this.cbtype.Text.Trim() == "1")//菜单叶子 { this.Store1.DataSource = new DAL.TreeDAO().GetMeunList(0); this.DataBind(); } else { this.Store1.DataSource = new DAL.TreeDAO().GetMeunList(1); this.DataBind(); } }上图:


本文介绍了一种使用COMBOBOX实现动态加载不同内容的方法。通过前后端配合,根据用户的选择来改变另一个下拉框的内容。具体实现了根据不同选项加载不同的数据源。
2594

被折叠的 条评论
为什么被折叠?



