ICallbackEventHandler接口实现多级联动 (转)
2007-05-19 13:23
447 查看
从一位老兄的Blog上看到了这个,可是代码却不太全(至少我这里看不全)。于是想办法补充了一点:
1、客户端脚本:
1 function CallServer()
2
7 function ReceiveServerData(rValue)
8
15 function selectChange(e)
16
26 function selectSon(e)
27
31 function ReceiveServerData(rValue)
32 /////////////////////
42 function selectChangeSon(e)
43
53 function select(e)
54
58 function hello(rValue)
59</script>
2、aspx页面代码
1 <select id="SelParent" runat="server" onchange="selectChange(this)">
2 <option selected="selected" value="0">请选择 </option>
3 </select>
4 <br />
5 <select id="SelSon" runat="server" onchange="selectChangeSon(this)">
6 <option selected="selected" value="0">请选择 </option>
7 </select>
8 <br />
9 <select id="Sel">
10 <option selected="selected" value="0">请选择</option>
11 </select>
3、服务器端代码
1 OracleConnection conn = new OracleConnection("Data Source=?;UID=?;PWD=?");
2
3
4 protected void Page_Load(object sender, EventArgs e)
5
6
12
13 private string resualt;
14
15
16 private void ParentBind()
17
18
32 private string SonBind(string e)//绑定第二级
33
34
50
51
52 private string ChildBind(string e)//绑定第三级
53
54
70
71
72 private DataSet ExecuteSql4Ds(string str)
73
74
90 void ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
91
92
116 string ICallbackEventHandler.GetCallbackResult()
117
118 {
119
120 return resualt;
121
122 }
4、数据库脚本
1 create table MULTIMENU
2 (
3 ID NUMBER(2) not null,
4 CID NUMBER(2) not null,
5 DSCT VARCHAR2(30) not null,
6 CCID NUMBER(2),
7 CCCID NUMBER(3)
8 )
9
10
1、客户端脚本:
1 function CallServer()
2
7 function ReceiveServerData(rValue)
8
15 function selectChange(e)
16
26 function selectSon(e)
27
31 function ReceiveServerData(rValue)
32 /////////////////////
42 function selectChangeSon(e)
43
53 function select(e)
54
58 function hello(rValue)
59</script>
2、aspx页面代码
1 <select id="SelParent" runat="server" onchange="selectChange(this)">
2 <option selected="selected" value="0">请选择 </option>
3 </select>
4 <br />
5 <select id="SelSon" runat="server" onchange="selectChangeSon(this)">
6 <option selected="selected" value="0">请选择 </option>
7 </select>
8 <br />
9 <select id="Sel">
10 <option selected="selected" value="0">请选择</option>
11 </select>
3、服务器端代码
1 OracleConnection conn = new OracleConnection("Data Source=?;UID=?;PWD=?");
2
3
4 protected void Page_Load(object sender, EventArgs e)
5
6
12
13 private string resualt;
14
15
16 private void ParentBind()
17
18
32 private string SonBind(string e)//绑定第二级
33
34
50
51
52 private string ChildBind(string e)//绑定第三级
53
54
70
71
72 private DataSet ExecuteSql4Ds(string str)
73
74
90 void ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
91
92
116 string ICallbackEventHandler.GetCallbackResult()
117
118 {
119
120 return resualt;
121
122 }
4、数据库脚本
1 create table MULTIMENU
2 (
3 ID NUMBER(2) not null,
4 CID NUMBER(2) not null,
5 DSCT VARCHAR2(30) not null,
6 CCID NUMBER(2),
7 CCCID NUMBER(3)
8 )
9
10
相关文章推荐
- ICallbackEventHandler接口实现多级联动
- ICallbackEventHandler接口实现多级联动
- 利用ICallbackEventHandler实现dropdownlist的无刷新多级联动
- ICallbackEventHandler接口实现无刷新调用后台
- js 调用后台方法 ICallbackEventHandler 接口实现局部刷新实例 ClientScript的GetCallbackEventReference方法实现局部刷新
- 利用 ICallbackEventHandler接口 实现客户端回调
- ICallbackEventHandler接口实现局部刷新实例
- 利用 ICallbackEventHandler接口 实现客户端回调
- 利用 ICallbackEventHandler接口 实现客户端回调
- >使用 ICallbackEventHandler 接口 实现 AJAX 功能
- asp.net 2.0中用 ICallbackEventHandler 实现无刷新联动
- 未能找到回调的目标 XX 或未实现 ICallbackEventHandler。
- ICallbackEventHandler实现
- php ajax实现的二级(多级)联动菜单(2008-10-21,11:36:08)
- 多级联动系列——ajax调用XML实现三级联动
- JavaScript实现二级、多级(N级)联动下拉列表框更新版(续)- 四级联动的演示
- EasyUI可编辑datagrid用combobox实现多级联动
- JavaScript实现二级、多级(N级)联动下拉列表框更新版,支持IE6,FireFox,函数和类两种调用方式,支持到N级,非常通用。
- JS简单实现多级Select联动菜单效果代码
- EditText控件的TextWatcher接口实现和其他控件的联动