使用服务(内置)动态填充dropdownlist
来源:互联网 发布:移动网络下载不了电影 编辑:程序博客网 时间:2024/06/10 02:31
前台:<head runat="server"> <title></title> <script type="text/javascript"> function SetImageList(obj) { PageMethods.ImagePathList(obj.id,SucFun,ErrFun); } function SucFun(res) { var id=res[res.length-1]; var obj = document.getElementById(id); for (var i = 0; i < res.length-1; i++) { var varItem = new Option(res[i], res[i]); obj.options.add(varItem); } obj.onclick = ""; } function ErrFun(err) { } function AddDropDownClick(obj ) { obj.onclick = SucFun(obj); } </script></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server"> </asp:ScriptManager> <div> <asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList> </div> </form></body>
后台:
[System.Web.Services.WebMethod()] [System.Web.Script.Services.ScriptMethod()] public static List<string> ImagePathList(string drodownid) { List<string> listtemp = new List<string>(); listtemp.Add("aa"); listtemp.Add("bb"); listtemp.Add(drodownid); return listtemp; }
0 0
- 使用服务(内置)动态填充dropdownlist
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用DataGrid动态绑定DropDownList
- 使用JS动态添加DropdownList项
- ASP.NET中如何动态获取表的字段来填充到DropDownList中
- dropdownlist 默认填充 --请选择---
- DropDownList使用
- 使用AjaxPro实现DataGrid中DropDownList的动态绑定
- Canvas也能实现Map的能拖能缩放的效果
- 几种常见的内嵌数据库
- 【mfc】标签页
- Poj 2084 Game of Connections(高精度卡特兰数)
- JQuery Mobile 学习笔记2-4:changePage()方法跳转页面
- 使用服务(内置)动态填充dropdownlist
- 【HDU2639】Bone Collector II
- IP3 比1DB压缩点 大10DB
- 按时间给表建立range分区
- leetcode Search Input Position
- 汉游天下公司的一些感悟
- Poj 2251 Dungeon Master(三维Dfs)
- 关于Cocos2d-x的一些认识(2)
- Android 百度地图 SDK v3_3_0 (三) ---离线地图