请高手们帮帮忙??谢谢!!! 大家有用DropDownList有数据访问的二联动 、 三联动 、四联动的例子吗??? 越详细越好!!越详细分越多哦!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.zxbc.cn/html/20070419/2210.html(转) 将前3个dropdownlist的autopostback属性设为true; private void InitializeComponent() { this.DropDownList1.SelectedIndexChanged += new System.EventHandler(this.DropDownList1_SelectedIndexChanged); this.Load += new System.EventHandler(this.Page_Load); } private void DindDDLST(DropDownList ddlst,string parentid) { string sql = "select * from table1 where parentid = ' " + parentid + " ' "; //读取数据绑定ddlst } private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e) { this.DropDownList2.Items.Clear(); this.DropDownList3.Items.Clear(); this.DropDownList4.Items.Clear(); DindDDLST(this.DropDownList2,this.DropDownList1.SelectedValue); } 如此类推; 2)修改前用ViewState记录所有选中的情况,保存后重新绑定; 或者不要重新绑定,而是保存成功后直接修改dropdownlist的当前item (源于高手写的) 省市区县(含全国完整数据库)Ajax无刷新三级联动 http://www.cnblogs.com/insus/archive/2011/07/04/2097059.html 微软的ASP.NET中的MVC架构跟JAVA中的MVC架构有什么区别? asp.net c# 操作pdf 关于aspx.VB或aspx.cs放在什么位置的问题 Webservice 两个sql 查询语句用union链起来会少了数据 获取DataList数据源 像腾讯QQ那样即时刷新怎么做? 怎么在后代码里打开一个新页面?在线,立结!!! 求二维码生成方法 ASP.NET执行存储过程为何返回值为空? 请高手们帮帮忙??谢谢!!! 上传图片时,对图片进行操作
private void InitializeComponent()
{
this.DropDownList1.SelectedIndexChanged += new System.EventHandler(this.DropDownList1_SelectedIndexChanged);
this.Load += new System.EventHandler(this.Page_Load); } private void DindDDLST(DropDownList ddlst,string parentid)
{
string sql = "select * from table1 where parentid = ' " + parentid + " ' ";
//读取数据绑定ddlst
}
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
this.DropDownList2.Items.Clear();
this.DropDownList3.Items.Clear();
this.DropDownList4.Items.Clear();
DindDDLST(this.DropDownList2,this.DropDownList1.SelectedValue);
}
如此类推; 2)修改前用ViewState记录所有选中的情况,保存后重新绑定;
或者不要重新绑定,而是保存成功后直接修改dropdownlist的当前item
(源于高手写的)