ASP.NET控件--DropDownList
绑定:
DropDownList1.DataSource = dataSet.Tables["Table1"].DefaultView;
//指定DropDownList使用的表里的那些字段
DropDownList1.DataTextField = "ItemName"; //dropdownlist的Text的字段
DropDownList1.DataValueField = "id";//dropdownlist的Value的字段
DropDownList1.DataBind();
取选择项:
DropDownList1.SelectedItem.Value()不要()
OracleCommand myCommand11 = new OracleCommand("select jh,cw,scts,ny,bj from dba04 where jh="+DropDownList1.SelectedItem.Value, myConnection);
加个空选项
this.DropDownList1.Items.Insert(0,new ListItem("请选择",""));
ASP.NET控件--DropDownList的更多相关文章
- C#控件DropDownList下拉列表默认打开
c#中的控件DropDownList要实现默打开确实不容易,之前也是想过页面上的点击之后就打开了,那直接模拟点击不就行了,试过后大失所望,根本没有效果. 于是网上找到了一个例子能实现IE浏览器下的打开 ...
- ASP.NET控件之RadioButtonList
“RadioButtonList”控件表示一个封装了一组单选按钮控件的列表控件. 可以使用两种类型的 ASP.NET 控件将单选按钮添加到网页上:各个“RadioButton”控件或一个“RadioB ...
- asp.net <asp:Content>控件
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_MainContent" runat=" ...
- FineUI 基于 ExtJS 的专业 ASP.NET 控件库
FineUI 基于 ExtJS 的专业 ASP.NET 控件库 http://www.fineui.com/
- ASP.NET控件<ASP:Button /> html控件<input type="button">区别联系
ASP.NET控件<ASP:Button />-------html控件<input type="button">杨中科是这么说的:asp和input是一样 ...
- asp.net控件的Hyperlink控件
Asp.net控件: Hyperlink控件:Hyperlink控件又称为超链接控件,该控件在功能上跟Html的<a herf=””>控件相似,其显示的模式为超链接的形式. 注意: Hyp ...
- asp.net控件开发基础(1)(转)原文更多内容
asp.net本身提供了很多控件,提供给我们这些比较懒惰的人使用,我认为控件的作用就在此,因为我们不想重复工作,所以要创建它,这个本身便是一个需求的关系,所以学习控件开发很有意思. wrox网站上有本 ...
- 把某个asp.net 控件 替换成 自定义的控件
功能:可以把某个asp.net 控件 替换成 自定义的控件 pages 的 tagMapping 元素(ASP.NET 设置架构) 定义一个标记类型的集合,这些标记类型在编译时重新映射为其他标记类型. ...
- Asp.Netserver控件开发的Grid实现(三)列编辑器
以下是GridColumnsEditor的实现代码: GridColumnsEditor.cs using System; using System.Collections.Generic; usin ...
随机推荐
- Rails secret token bug
ArgumentError (A secret is required to generate an integrity hash for cookie session data. Use confi ...
- js备忘录_2
JS函数的参数在function内可以用arguments对象来获取. 转化为数组:var arr=Array.prototype.slice.call(arguments,0); Array有两个: ...
- Oracle之RMAN备份恢复1-基础篇
1,rman的作用与体系架构 1.1 什么是rman rman(recovery manager)是oracle8i以后dba的一重要工具一般位于$oracle_home/bin目录下,主要用来备份, ...
- logstash实战tcp插件
vim /etc/logstash/conf.d/tcp.conf input{ tcp{ type => "tcp" port => "6666" ...
- PyCharm安装配置Qt Designer+PyUIC教程
原文写的不错,拿来大家都可以看一下 原文地址:https://www.cnblogs.com/lsdb/p/9121903.html https://www.cnblogs.com/tiankong2 ...
- 11.21 CSS学习-上午
font-family:设置文本的字体序列,应当多设置几个,作为后备机制,如果浏览器不支持第一种字体,它将尝试下一种字体.字体序列的名字超过一个字需要使用引号,多个字体序列用逗号分隔指明:{font- ...
- easyui 特殊操作
--EasyUI - datagrid中单元格里编辑控件的单击事件如何获取当前行的index var rowIndex = $(this).parents('.datagrid-row').attr( ...
- vim编辑器的基本用法
使用linux时候,个人比较喜欢用vim编辑器,对文本进行操作. 为了方便我使用vim编辑器,特地搜索了一下教程记录于此,防止自己忘记了. 下面就是一些vim使用的基础操作: 使用vim打开软件 vi ...
- 【F12】Console命令,让js调试更简单
Console命令,让js调试更简单 一.显示信息的命令 console.log("normal"); // 用于输出普通信息 console.info("informa ...
- python操作docx学习资料
1.博客 (1)写入参考 https://www.cnblogs.com/rencm/p/6285304.html (2)读取参考 http://www.cnblogs.com/zhanghongfe ...