WebForm控件--2016年12月29日
简单控件
1、Label => <span id="Label1">Label1</span>
2、Literal => Text 填什么直接转成HTML 输出
3、TextBox ╦=> TextMode="SingleLine" => <input name="TextBox1" type="text" id="TextBox1" />
╠=> TextMode="Password" => <input name="TextBox1" type="password" id="TextBox1" />
╚=> TextMode="MultiLine" => <textarea name="TextBox1" rows="2" cols="20" id="TextBox1">
Maxlength:最大长度 warp:换行
4、HiddenField => <input name="TextBox1" type="hidden" id="TextBox1" />
5、Button => <input type="submit" name="Button1" value="Button" id="Button1" />
Onclintclick => onclick属性
6、ImageButton => <input type="image" name="ImageButton1" id="ImageButton1" src="">
7、LinkButton =>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<a id="LinkButton1" href="javascript:__doPostBack('LinkButton1','')">LinkButton</a>
编译后
复合控件
绑定数据
RadioButtonList1.DataSource = ;
RadioButtonList1.DataTextField = "";
RadioButtonList1.DataValueField = "";
RadioButtonList1.DataBind();
1、RadioButtonList
2、CheckBoxList
RepeatLayout:布局标签 RepeatDirection:布局方式 RepeatColumns:每行的列数
3、DropDownList => Combobox
AutoPostBack:自动提交
4、ListBox => 可多选
SelectionMode
* AutoPostBack 属性用于设置或返回当用户在 TextBox 控件中按 Enter 或 Tab 键时,是否发生自动回传到服务器的操作。
控件名称 指定触发事件的属性
CheckBox OnCheckChanged
CheckBoxList OnSelectedIndexChanged
DropDownList OnSelectedIndexChanged
ListBox OnSelectedIndexChanged
RadioButton OnCheckChanged
RadioButtonList OnSelectedIndexChanged
TextBox OnTextChanged
WebForm控件--2016年12月29日的更多相关文章
- ListView控件--2016年12月9日
ListView属性 ListView 名称 说明 AccessKey 重写 WebControl.AccessKey 属性. 不支持将此属性设置 ListView 控件.(覆盖 WebContr ...
- WindowsForm公共控件--2016年12月5日
Button text:修改按钮显示的文字 CheckBox Checked:是否选中 CheckedListBox checkedListBox.Items.Add(显示的值,初始选中状态); ch ...
- 2016年12月29日 星期四 --出埃及记 Exodus 21:24
2016年12月29日 星期四 --出埃及记 Exodus 21:24 eye for eye, tooth for tooth, hand for hand, foot for foot,以眼还眼, ...
- WinForm用户控件、动态创建添加控件、timer控件--2016年12月12日
好文要顶 关注我 收藏该文 徐淳 关注 - 1 粉丝 - 3 0 0 用户控件: 通过布局将多个控件整合为一个控件,根据自己的需要进行修改,可对用户控件内的所有控件及控件属性进行修 ...
- 2016年12月31日 星期六 --出埃及记 Exodus 21:26
2016年12月31日 星期六 --出埃及记 Exodus 21:26 "If a man hits a manservant or maidservant in the eye and d ...
- 2016年12月30日 星期五 --出埃及记 Exodus 21:25
2016年12月30日 星期五 --出埃及记 Exodus 21:25 burn for burn, wound for wound, bruise for bruise.以烙还烙,以伤还伤,以打还打 ...
- 2016年12月28日 星期三 --出埃及记 Exodus 21:23
2016年12月28日 星期三 --出埃及记 Exodus 21:23 But if there is serious injury, you are to take life for life,若有 ...
- 2016年12月27日 星期二 --出埃及记 Exodus 21:22
2016年12月27日 星期二 --出埃及记 Exodus 21:22 "If men who are fighting hit a pregnant woman and she gives ...
- c++中变量声明和变量定义的区别。2016年12月6日
整个流程: 1.程序告诉cpu,程序将要使用一个变量.(暂时不一定用到,先说一下.) 2.程序告诉CPU,程序现在就要使用一个变量.(现在就用) 3.cpu按照这个变量的类型,把内存划分出几个单位(b ...
随机推荐
- 搭建一套自己实用的.net架构(3)【ORM-Dapper+DapperExtensions】
现在成熟的ORM比比皆是,这里只介绍Dapper的使用(最起码我在使用它,已经运用到项目中,小伙伴们反馈还可以). 优点: 1.开源.轻量.小巧.上手容易. 2.支持的数据库还蛮多的, Mysql,S ...
- [LeetCode] Largest Number 最大组合数
Given a list of non negative integers, arrange them such that they form the largest number. For exam ...
- Javascript的this用法及jQuery中$this和$(this)的区别
this是Javascript语言的一个关键字. 它代表函数运行时,自动生成的一个内部对象,只能在函数内部使用.比如, function test(){ this.x = 1; } 1.this就是全 ...
- 归一化方法 Normalization Method
1. 概要 数据预处理在众多深度学习算法中都起着重要作用,实际情况中,将数据做归一化和白化处理后,很多算法能够发挥最佳效果.然而除非对这些算法有丰富的使用经验,否则预处理的精确参数并非显而易见. 2. ...
- Ubuntu 上搭建 Samba 服务器
由于经常要接收同事发送的一些文件,U盘拷来拷去的很麻烦. 在本机Ubuntu上搭了各Samba服务器,过程中遇到点小问题,记录一下 sudo apt-get install samba 创建一个共享目 ...
- css 使图片水平垂直居中
1.利用display:table-cell,具体代码如下: html代码如下: <div class="img_wrap"> <img src="wg ...
- vuex(1.0版本写法)
Vuex 是一个专门为 Vue.js 应用所设计的集中式状态管理架构. 官方文档:http://vuex.vuejs.org/zh-cn/ 2.0和1.0都能在此找到 每一个 Vuex 应用的核心就 ...
- 网页中如何启用QQ交谈
很多网友都会发现好多的网页中会有诸如,网页中如何启用QQ交谈? 1. 登录QQ, 打开网址:http://shang.qq.com/v3/widget.html 启用QQ通讯组件. 2. 选择组件样式 ...
- UBER的故事
今天分享一个很好的视频,19分钟,这个视频讲了过去几年一家伟大公司的成长的思路,这个演讲的PPT很棒,演讲者的语速.语调.表情等也非常适合大家在日常工作中学习. 链接:http://v.youku ...
- SLES 11 SP3防火墙设置
防火墙简介 SLES 11 SP3 系统安装后,防火墙一般是启动的,它有两个服务:SuSEfirewall2_setup.SuSEfirewall2_init 关闭防火墙 # 方法一 rcSuSEfi ...