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] Surrounded Regions 包围区域
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured ...
- [LeetCode] Median of Two Sorted Arrays 两个有序数组的中位数
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two ...
- 分享“12306 P2P平台”创业Idea
结合云平台抢票,社区,P2P等性质,实施供求抢票平台,能有效提高和整合抢票市场,抢票优势以杜绝黄牛,给散户提供更有利的抢票途径.本在11月计划实施,后去搞比特币,故分享摘要集思广益. 背景 ...
- JavaScript模板引擎artTemplate.js——引入子模板
之前的例子都是单一结构的对象,如果遇到复杂对象结构,我们可以通过引入子模板来实现html的渲染. 依旧以之前的数据作为例子: <div id="content">< ...
- caffe调试小结2
1.裁剪 crop size227,在训练时候采用随机裁剪,在测试时候只裁剪中间部分
- 从list表单序列化后的值转成标准json
var json = {"name":["1111","222"],"sex":["男"," ...
- jQuery 运行机制
1.Selector,查找元素.这个查找不但包含基于CSS1~CSS3的CSS Selector功能,还包含其对直接查找或间接查找而扩展的一些功能. 2.Dom元素的属性操作.Dom元素可以看作htm ...
- C#做有模和非模式化窗体 传值例程
有模窗体:指的是一定要在第二个窗体上操作之后 才能去操作前者窗体 :例如,如果一个对话框,在可以切换到其它窗体或对话框之前要求先单击"确定"或"取消",则它就是 ...
- 二叉排序树(BST)创建,删除,查找操作
binary search tree,中文翻译为二叉搜索树.二叉查找树或者二叉排序树.简称为BST 一:二叉搜索树的定义 他的定义与树的定义是类似的,也是一个递归的定义: 1.要么是一棵空树 2.如果 ...
- iconfont使用,亲测
iconfont对于前端应用来说有很多便捷: 1.自由变化大小 2.自由修改颜色 3.可以添加一些视觉效果如:阴影.旋转.透明度. 4.兼容IE6 在线引用和下载到本地两种方法 一.在线引用 图标的制 ...