惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
量子位
博客园 - 三生石上(FineUI控件)
Hacker News - Newest:
Hacker News - Newest: "LLM"
月光博客
月光博客
博客园 - 叶小钗
爱范儿
爱范儿
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Security Archives - TechRepublic
Security Archives - TechRepublic
小众软件
小众软件
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
V
Visual Studio Blog
V
V2EX
Schneier on Security
Schneier on Security
Cloudbric
Cloudbric
有赞技术团队
有赞技术团队
C
Check Point Blog
T
Troy Hunt's Blog
Google DeepMind News
Google DeepMind News
Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Schneier on Security
N
Netflix TechBlog - Medium
Project Zero
Project Zero
Last Week in AI
Last Week in AI
N
News and Events Feed by Topic
Microsoft Azure Blog
Microsoft Azure Blog
NISL@THU
NISL@THU
T
The Exploit Database - CXSecurity.com
AWS News Blog
AWS News Blog
博客园 - 聂微东
S
Securelist
腾讯CDC
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
B
Blog
博客园 - 【当耐特】
Y
Y Combinator Blog
N
News and Events Feed by Topic
Recorded Future
Recorded Future
Vercel News
Vercel News
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest

博客园 - 嚣张的沉默

读写txt文档 限制TextBox输入字数 计算TextBox输入的字数 我常用的正则与SQL语句 DataSet导入到Excel 年月日联动的JS代码 用户控件的传值方法 asp.net的几个小技巧 百叶窗效果 建站安全 倒计时代码 解决SQL2000安装服务器挂起 删除.NET的最近项目 屏幕右下角弹出广告 DataSet写入、导出XML 上传图片重命名并创建文件夹 自动跳转页面带参数 微软出的AJAX控件的安装(转载) 第一次开博
Repeater模板列
嚣张的沉默 · 2008-01-22 · via 博客园 - 嚣张的沉默

最近公司要做一个拍卖的功能,用户竞拍某个商品,出价高的状态那列显示领先,其它用户均显示淘汰,以前没用过Repeater,这个问题困扰了我一整天,唉,还是水平太菜呀!(按出价倒序排列,第一位为领先)

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" >
        
<HeaderTemplate>
        
<table width="576" border="0">
  
<tr>
    
<td width="35">序号</td>
    
<td width="173">姓名</td>
    
<td width="118">数量</td>
    
<td width="141">出价</td>
    
<td width="87">状态</td>
  
</tr>
        
</HeaderTemplate>
        
<ItemTemplate>
        
<tr>
    
<td><%#Eval("pmID")%></td>
    
<td><%#Eval("pm_Name"%></td>
    
<td><%#Eval("pm_qty"%></td>
    
<td><%#Eval("pm_price"%></td>
    
<td>
        
<%# Container.ItemIndex==0?"领先":"淘汰"%> 
</td>
  
</tr>
        
</ItemTemplate>
        
<FooterTemplate>
        
</table>
        
</FooterTemplate>
        
</asp:Repeater>

一般论坛发贴子,此贴有人留言显示数量,没人留言显示“-”

<%# ((int)(DataBinder.Eval(Container.DataItem, "绑定的字段")) == 0? "-" : "绑定的回贴数字段"%>