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 ...
随机推荐
- [LeetCode] Roman to Integer 罗马数字转化成整数
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 t ...
- docker 学习过程
参考: http://git.oschina.net/search?search=csphere&type=project&language=&page=2&condi ...
- CentOS升级openssl
才设置了http2,结果蓝狗说我网站不安全,检测一下发现openssl有漏洞,于是准备升级一下openssl 检测网站: www.ssllabs.com/ssltest/analyze.html # ...
- CSS Icon 项目地址 小图标-用css写成的
http://cssicon.space/#/icon/focus 这是所有用css写成的 小图标 右侧有 html和css代码
- C语言栈调用机制初探
学习linux离不开c语言,也离不开汇编,二者之间的相互调用在源代码中几乎随处可见.所以必须清楚地理解c语言背后的汇编结果才能更好地读懂linux中相关的代码.否则会有很多疑惑,比如在head.s中会 ...
- 【BZOJ-2119】股市的预测 后缀数组
2119: 股市的预测 Time Limit: 10 Sec Memory Limit: 259 MBSubmit: 334 Solved: 154[Submit][Status][Discuss ...
- 使用Python解析JSON数据
使用Python解析百度API返回的JSON格式的数据 # coding:utf-8 # !/usr/bin/env python import matplotlib.pyplot as plt fr ...
- [Android]学习笔记Activity_001
操作button的说明 设置button的ID: android:id="@+id/button" 设置button的点击事件 findViewById(R.id.button). ...
- Lua IDE
http://blog.csdn.net/visualcatsharp/article/details/37653107
- 101 LINQ Samples
https://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b