我在什么事件绑定这个label5?? 因为数据源里面没有这个累加
在页面上获取不到gridview1 必须在事件里才能获取 我的datalist绑定 方法 public void Db()
{
TB_BLL.BCommodity CommoditySelect = new BCommodity();
TB_BLL.BStore BSelect = new BStore();
DataList1.DataSource = CommoditySelect.SqlExecute("select * from TB_Store where UserName in (select TB_Commodity.UserName from TB_Commodity,TB_ShoppingCart where TB_Commodity.ID=TB_ShoppingCart.CommodityID and TB_ShoppingCart.UserName='"+User.Identity.Name+"')"); DataList1.DataBind();
}
如果在里面添加这个 怎么写啊???我想 因为小计值绑定了 <asp:Label ID="Label3" runat="server" Text= <%#Eval("total")%> ></asp:Label>
下面 还有个label 我想将这个label的值 弄成 label值的和 能不能在 总计:<asp:Label ID="Label5" runat="server" Text= ></asp:Label>
<%#Eval("total")%>这个怎么累加一下?
在页面上获取不到gridview1 必须在事件里才能获取 我的datalist绑定 方法 public void Db()
{
TB_BLL.BCommodity CommoditySelect = new BCommodity();
TB_BLL.BStore BSelect = new BStore();
DataList1.DataSource = CommoditySelect.SqlExecute("select * from TB_Store where UserName in (select TB_Commodity.UserName from TB_Commodity,TB_ShoppingCart where TB_Commodity.ID=TB_ShoppingCart.CommodityID and TB_ShoppingCart.UserName='"+User.Identity.Name+"')"); DataList1.DataBind();
}
如果在里面添加这个 怎么写啊???我想 因为小计值绑定了 <asp:Label ID="Label3" runat="server" Text= <%#Eval("total")%> ></asp:Label>
下面 还有个label 我想将这个label的值 弄成 label值的和 能不能在 总计:<asp:Label ID="Label5" runat="server" Text= ></asp:Label>
<%#Eval("total")%>这个怎么累加一下?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货