Repeater的用法
来源:互联网 发布:mac和芭比布朗粉底 编辑:程序博客网 时间:2024/05/20 04:13
<asp:Repeater ID="Repeater_Price" runat="server" OnItemDataBound="Repeater_Price_ItemDataBound">
<ItemTemplate>
<tr bgcolor="white">
<td style="height: 25px"> <font color="red"><strong><asp:Label ID="labBigCategory" runat="server"></asp:Label></strong></font></td>
<td style="height: 25px"> <asp:Label ID="labSmallCategory" runat="server"></asp:Label></td>
<td style="height: 25px"> <asp:Label ID="labUnit" runat="server"></asp:Label></td>
<td style="height: 25px"> <asp:Label ID="labNum" runat="server"></asp:Label></td>
<td style="height: 25px"> <asp:Label ID="labPrice" runat="server"></asp:Label></td>
<td style="height: 25px"> <asp:Label ID="labTotalPrice" runat="server"></asp:Label></td>
<td style="height: 25px"> <asp:Label ID="labRemarks" runat="server"></asp:Label></td>
</tr>
</ItemTemplate>
</asp:Repeater>
this.Repeater_Price.DataSource = ServiceLocator.ProjectService.GetProjectPriceByProId(proId);
this.Repeater_Price.DataBind();
/// <summary>
/// 初始化绑定
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Repeater_Price_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
ProjectPrice proPrice = (ProjectPrice)e.Item.DataItem;
Label l_BigCategory = (Label)e.Item.FindControl("labBigCategory");
l_BigCategory.Text = proPrice.ProjectBigCate;
Label l_SmallCategory = (Label)e.Item.FindControl("labSmallCategory");
l_SmallCategory.Text = proPrice.ProjectSmallCate;
Label l_Unit = (Label)e.Item.FindControl("labUnit");
l_Unit.Text = proPrice.Unit;
Label l_Num = (Label)e.Item.FindControl("labNum");
l_Num.Text = Convert.ToString(proPrice.Num);
Label l_Price = (Label)e.Item.FindControl("labPrice");
l_Price.Text =Convert.ToString(proPrice.ProjectCountPrice);
Label l_TotalPrice = (Label)e.Item.FindControl("labTotalPrice");
l_TotalPrice.Text = Convert.ToString(proPrice.ProjectCountPrice * proPrice.Num);
Label l_Remarks = (Label)e.Item.FindControl("labRemarks");
l_Remarks.Text = proPrice.Remarks;
}
}
- Repeater的用法
- repeater的几个用法
- Repeater的相关用法总结
- 关于repeater嵌套的用法
- Repeater用法(
- repeater用法
- Repeater DataList GridView的嵌套用法
- 绑定数据 Repeater 与ObjectDataSource的用法
- asp.net webForm中的Repeater的用法
- Asp.net -Repeater用法
- repeater 的复杂用法(内含有服务端控件)[1]
- flex里面repeater的用法(相当于for循环功能)
- Flex4中Repeater和Flex3中HorizontalList的用法
- C#学习笔记(三)---------Repeater的一些常规用法
- ASP.NET-----Repeater数据控件的用法总结
- ASP.NET-----Repeater数据控件的用法总结
- ASP.NET-----Repeater数据控件的用法总结
- flex中的Repeater的用法,类似Java中的for循环
- asp.net实现网站Rss订阅功能
- Linux下编程为什么多用进程少用线程?
- 操作系统学习:深入分析Linux内核链表
- 不创建表结构,直接放入临时表结果(包括存储过程,直接sql语句)
- Visitor模式
- Repeater的用法
- 试试为什么发不了文章
- 视图view和临时表的区别
- 关于批量插入时触发器的使用
- 析构函数、Finalize()和Dispose()的区别
- PClint配置
- 开始写博客......
- 向大家推荐几个比较好的Symbian论坛
- OAL中也可以操作注册表