ASP.NET 4.0 New Feature : 表单控制项之延伸RepeatLayout功能
来源:互联网 发布:淘宝卖家被诈骗57000 编辑:程序博客网 时间:2024/06/03 13:50
CheckBoxList 和RadioButtonList这两个清单控制项,在ASP.NET 4.0中的RepeatLayout属性有做了延伸性的功能加强,在以往的ASP.NET 3.5版本中,RepeatLayout属性只有两个选择可以设定,分别为: Table和Flow。 如果这个属性设定为RepeatLayout.Table,则清单中的项目会显示在资料表,如果这个属性设定为RepeatLayout.Flow,则清单中的项目不显示资料表结构。 例如假设我们把控制项设定为以下设定: <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatLayout="Flow"> <asp:ListItem Text="CheckBoxList" Value="cbl" /> </asp:CheckBoxList> <asp:RadioButtonList runat="server" RepeatLayout="Table"> <asp:ListItem Text="RadioButtonList" Value="rbl" /> </asp:RadioButtonList> 那么浏览网页后所得到的HTML将分别转译为sapn和table为: < span id="CheckBoxList1"> <input id="CheckBoxList1_0" type="checkbox" name="CheckBoxList1$0" /> <label for="CheckBoxList1_0">CheckBoxList</label> </span> < table id="RadioButtonList1" border="0"> <tr> <td><input id="RadioButtonList1_0" type="radio" name="RadioButtonList1" value="rbl" /> <label for="RadioButtonList1_0">RadioButtonList</label> </td> </tr> </table> 那么ASP.NET 4.0又多了另外两个选择设定,分别为:OrderedList 和UnorderedList,如果这个属性设定为RepeatLayout. OrderedList,则清单中的项目会显示使用ol搭配li设定显示,如果这个属性设定为RepeatLayout . UnorderedList,则清单中的项目会显示使用ul搭配li设定显示。 以下假设针对CheckBoxList分别设定RepeatLayout. OrderedList和RepeatLayout. UnorderedList,我们来看看所呈现不同的结果,首先当设定为OrderedList,则如下图所示,会有顺序性的排序编号资料: 如果是设定为UnorderedList,则会呈下如下图所示,并不会有顺序编号,但是会用条列重点方式: 这里要特别注意一点,假设你设定RepeatLayout为OrderedList 或是UnorderedList,那么另一个属性RepeatDirection就不能设定修改为Horizontal,否则将会出现设计上的错误,预设只能搭配Vertical。
文章来自: IT工程技术网 http://www.systhinker.com/html/36/n-11536.html
文章来自: IT工程技术网 http://www.systhinker.com/html/36/n-11536.html
- ASP.NET 4.0 New Feature : 表单控制项之延伸RepeatLayout功能
- C# 4.0 New Feature
- Dynamics CRM 2015Online Update1 new feature之表单页Tabs切换
- ASP.NET登录控件延伸(个性化)
- asp.net控制Excel----弹出打开下载框(NEW)
- ASP.NET表单验证之CustomValidator控件
- ASP.NET表单验证之ValidationSummary控件
- ASP.net学习之表单介绍
- ASP.NET表单验证之Form
- 11g new feature 之 SPM
- Oracle 11g new Feature 之 _sqlmon_threshold
- ASP.net验证控制之CustomValidator控件
- ASP.net验证控制之CustomValidator控件
- ASP.NET 表单
- ASP.NET 表单
- ASP.NET 表单 (翻译)
- asp.net 表单验证
- ASP.NET提交表单
- Web (WCF) Service设计的 基本观念
- java 转义字符
- ora-03206 maximum file size of blocks in autoextend clause is out of range
- MFC 获取系统时间
- 好长时间没来了
- ASP.NET 4.0 New Feature : 表单控制项之延伸RepeatLayout功能
- word按backspace键不能删除问题
- linux学习笔记
- Application = Code + Workflow
- :移植tslib-1.4
- HTML5 Web Sockets与代理服务器交互
- 在Silverlight 2.0应用程序中调用JavaScript
- PowerDesigner逆向工程图文讲解--温习老知识
- bashrc on May 15,2010