首页 新闻 会员 周边 捐助

在前台使用Eval()方法将数据绑定在HTML标签中,要在后台取得绑定的数据要怎么做?

0
悬赏园豆:10 [已关闭问题]

   <td class="style1" >
                                             <table id="tab1">
               
                                  <tr>
                                                    <th  width="120">商品名称</th>
                                                    <th width="180" style="height: 27px">市场价</th>
                                                                <th width="100" style="height: 27px">商品积分</th>
                                                                <th width="80" style="height: 27px">商品数量(件)</th>
                                                                <th width="100" style="height: 27px">所需支付(积分)</th>
                                                               
                                                        </tr>
                                                     
                                                              <asp:Repeater ID="Repeater1"   runat="server">
                                                                    <ItemTemplate>
                                                                        <tr>

                                                                            <td width="100"><%#Eval("gift_name")%></td>
                                                                             <td width="100"><%#Eval("Gift_price")%></td>
                                                                            <td width="100"><%#Eval("Gift_Integral")%></td>
                                                                            <td width="100"><input type="text" value="<%#Eval("total")%>"  onkeyup="fun()" /></td>
                                                                            <td  width="100"id="td<%#Eval("gift_id") %>"></td>
                                                                          
                                                                  
                                                                         </tr>
                                                                   </ItemTemplate>
                                                           </asp:Repeater>
                                                      
                       </table>
                            
                                    </td>
                           

青春沧桑的主页 青春沧桑 | 初学一级 | 园豆:110
提问于:2010-07-09 10:16
< >
分享
其他回答(1)
0

"要在后台取得绑定的数据要怎么做"这一句不理解,你的意思是绑定Repeater吗?如果是给控件的DataSource绑定就可以了。

Astar | 园豆:40805 (高人七级) | 2010-07-09 10:54
0

绑定Repeater的OnItemDataBound事件,在事件处理函数中取得绑定的item,e.Item.DataItem

e.Item.DataItem中就能够取得需要的数据。

dangjian | 园豆:348 (菜鸟二级) | 2010-07-09 12:32
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册