各种前台绑定
来源:互联网 发布:新浪期货数据接口api 编辑:程序博客网 时间:2024/06/05 20:45
记录,以便使用
1、GridView 中列
<asp:TemplateField HeaderText="<%$ Resources:LexmarkMpsDoa,Field_BillCo %>">
<ItemTemplate>
<asp:Label ID="lblArea" runat="server" Text='<%# Bind("Printer_DoaCo") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Wrap="false" />
</asp:TemplateField>
2、绑定资源文件
上述中的<asp:TemplateField HeaderText="<%$ Resources:LexmarkMpsDoa,Field_BillCo %>">为一种
直接写到td中的:<%=Resources.LexmarkMpsDoa.Field_PrinterPartNo%>
3、Text='<%#DataBinder.Eval(Container.DataItem,"EntrustCo")%>'
4、时间格式:<asp:BoundField DataField ="Birthday" HeaderText ="生日" DataFormatString ="{0:yyyy-MM-dd}"/>
5、 模板列时间格式
<asp:TemplateField HeaderText="提交时间">
<ItemTemplate>
<asp:Label ID="lblCategory" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"EndDate","{0:yyyy-MM-dd}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Wrap="false" />
</asp:TemplateField>
6、字符处理:<asp:Label ID="lblCusName" runat="server" Text='<%# (bool)Eval("IsTrusted")?"先发后返":"先返后发" %>'></asp:Label>
7、绑定RowNo: <asp:LinkButton ID="BtnDetails" runat="server" CommandArgument=<%#((GridViewRow) Container).RowIndex %> CommandName="Details" Text="<%$ Resources:LexmarkMpsDoa,Identity_View %>"></asp:LinkButton>
<asp:Label ID="lb_NO" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
8、格式化模板列
<asp:TemplateField HeaderText="<%$ Resources:LexmarkMpsDoa,Field_ReceiveDate %>">
<ItemTemplate>
<asp:Label ID="lblReceiveDate" runat="server" Text='<%# string.Format("{0:yyyy-MM-dd HH:MM:ss}", Eval("ReceiveDate")) %> '></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Wrap="false" />
</asp:TemplateField>
9、获取客户端Id
document.getElementById("<%=BtnRefreshUpload.ClientID %>").click();
- 各种前台绑定
- 前台字段绑定,变量绑定
- 模板列前台绑定
- div 前台绑定html
- 前台绑定数据
- aspx 页面数据绑定 前台数据绑定
- 前台读取并绑定gridview
- WPF 前台处理绑定字段
- ASP.net前台绑定形式
- Jquery各种前台效果JQ
- ASP.NET的前台数据绑定概要
- 引用 常用的前台数据绑定方法
- 前台绑定后台 DataTable 或 泛型 等
- JS前台动态无刷新绑定DropDownList
- 前台跨页面传递绑定参数
- 【WPF】MVVM前台绑定一组RadioButton按钮
- asp.net前台页面数据绑定----对象类表绑定
- 调查前台各种插件的注意事项
- javascript getElementById 使用方法及用法
- PHP程序来操作MongoDB【NoSQL】的一些方法及MongoDB安装
- asp.net中页面之间传值问题
- socket 各种头数据结构
- 【运维技术】mysql5.5.15源码包编译安装
- 各种前台绑定
- jquery.validate.js的remote用法
- 可循环显示图像的Android Gallery组件
- tmp
- iphone和Objective-C笔试题?
- c++之派生类
- 系统设计说明书(架构、概要、详细)目录结构
- web开发中添加数据源
- OpenCores学习(0) --概述