DataBinder.Eval用法范例
发布日期:2022-02-13 21:45:50
浏览次数:24
分类:技术文章
本文共 559 字,大约阅读时间需要 1 分钟。
DataBinder.Eval用法范例
2007-01-26 16:16:37
//<%# DataBinder.Eval(Container.DataItem, "UnitPrice", "${0:F2}") %>
//{0:G}代表显示True或False
//<ItemTemplate>// <asp:Image Width="12" Height="12" Border="0" runat="server"// AlternateText='<%# DataBinder.Eval(Container.DataItem, "Discontinued", "{0:G}") %>'// ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Discontinued", "~/images/{0:G}.gif") %>' />// </ItemTemplate>//转换类型
((string)DataBinder.Eval(Container, "DataItem.P_SHIP_TIME_SBM8")).Substring(4,4){0:d} 日期只显示年月日
{0:yyyy-mm-dd} 按格式显示年月日{0:c} 货币样式 文章引用自:
转载地址:https://blog.csdn.net/glumtree/article/details/1763679 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
很好
[***.229.124.182]2024年04月13日 22时49分55秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
【Leetcode刷题篇】前K个高频元素
2019-04-26
【Leetcode刷题篇】leetcode373 查找和最小的K对数字
2019-04-26
【Leetcode刷题篇】leetcode367 有效的完全平方数
2019-04-26
【Leetcode刷题篇】剑指offer-数值的整数次方
2019-04-26
【Leetcode刷题篇】面试题01.06 字符串压缩
2019-04-26
【Leetcode刷题篇】leetcode443 压缩字符串
2019-04-26
【面试篇】数据结构-线性表
2019-04-26
【面试篇】数据结构-树形结构
2019-04-26
【面试篇】数据结构-哈希表
2019-04-26
【Leetcode刷题篇】leetcode88 合并两个有序数组
2019-04-26
【Leetcode刷题篇】剑指offer51 数组中的逆序对
2019-04-26
【Leetcode刷题篇】剑指offer55-平衡二叉树
2019-04-26
【Leetcode刷题篇】leetcode98 判断一棵树是否为二叉搜索树
2019-04-26
Java中arraylist和数组的相互转换
2019-04-26
【Leetcode刷题篇 】leetcode147 对链表进行插入排序
2019-04-26
【Leetcode刷题篇】leetcode148 排序链表
2019-04-26
【面试篇】Java对象的hashCode()相同,equals()一定为true吗?
2019-04-26
【面试篇】Java中static和final关键字的作用是什么?
2019-04-26
【面试篇】Java中接口和抽象类的区别是什么?
2019-04-26