标题:模板列取不到值(C#)
取消只看楼主
serverserver
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-1-26
结帖率:0
已结贴  问题点数:20 回复次数:0 
模板列取不到值(C#)
<table>
<tr style =" font :9pt; font-family :宋体;">
                                <td align="center" valign="top" colspan="2" style="" >
                                    <asp:GridView ID="gvShopCart" DataKeyNames ="CartID" runat="server"
                                        AutoGenerateColumns="False" PageSize="5" Width="95%" ForeColor="Transparent">
                                     <Columns>
                                        <asp:BoundField DataField="GoodsID" HeaderText="商品编号" ReadOnly="True">
                                             <ItemStyle HorizontalAlign="Center" />
                                             <HeaderStyle HorizontalAlign="Center" />
                                         </asp:BoundField>
                                         <asp:BoundField DataField="GoodsName" HeaderText="商品名称" ReadOnly="True">
                                             <ItemStyle HorizontalAlign="Center" />
                                             <HeaderStyle HorizontalAlign="Center" />
                                         </asp:BoundField>
                                      
                                         <asp:TemplateField HeaderText ="市场价">
                                             <HeaderStyle HorizontalAlign="Center" />
                                             <ItemStyle HorizontalAlign ="Center" />
                                             <ItemTemplate >
                                                 <%#DataBinder.Eval(Container.DataItem,"MarketPrice").ToString()%> ¥
                                             </ItemTemplate>   
                                         </asp:TemplateField>
                                        <asp:TemplateField HeaderText ="会员价">
                                             <HeaderStyle HorizontalAlign="Center" />
                                             <ItemStyle HorizontalAlign ="Center" />
                                             <ItemTemplate >
                                                 <%#DataBinder.Eval(Container.DataItem,"MemberPrice").ToString()%>
                                              ¥
                                             </ItemTemplate>   
                                             
                                         </asp:TemplateField>
                                         <asp:TemplateField HeaderText ="商品重量">
                                             <HeaderStyle HorizontalAlign="Center" />
                                             <ItemStyle HorizontalAlign ="Center" />
                                             <ItemTemplate >
                                             <%#DataBinder.Eval(Container.DataItem, "GoodsWeight").ToString()%> <b>kg</b>
                                             </ItemTemplate>   
                                         </asp:TemplateField>
                                         <asp:BoundField DataField="Num" HeaderText="数量">
                                             <ItemStyle HorizontalAlign="Center" />
                                             <HeaderStyle HorizontalAlign="Center" />
                                         </asp:BoundField>
                                         
                                         <asp:TemplateField HeaderText ="小计">
                                             <HeaderStyle HorizontalAlign="Center" />
                                             <ItemStyle HorizontalAlign ="Center"/>
                                             <ItemTemplate >
                                             <%#DataBinder.Eval(Container.DataItem, "SumPrice").ToString()%> ¥
                                             </ItemTemplate>   
                                         </asp:TemplateField>
                                         
                                     </Columns>
                                    </asp:GridView></td>
                            </tr>
</table>

我想取到模板列"会员价"的值,敬请各位高手相助.
搜索更多相关主题的帖子: 模板 
2010-01-26 10:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-296503-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.140247 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved