日期:2014-05-19  浏览次数:20934 次

很简单的问题,CS文件中怎么得到Repeater从数据库中读出的另一个值?
a.aspx
-----------------------------
<asp:Repeater   ID= "Repeater1 "   OnItemCommand= "R1_ItemCommand "
......
<asp:LinkButton   ID= "Button1 "   runat= "server "     Text= <%#   DataBinder.Eval(Container.DataItem,   "Catalog_Name ")   %> />
<asp:Label   ID= "aaa "   Text= <%#   DataBinder.Eval(Container.DataItem,   "Catalog_ID ")   %>   runat= "server "   Visible= "false "   />
....
</asp:Repeater>
----------------------------
a.aspx.cs                                
public   void   R1_ItemCommand(Object   Sender,   RepeaterCommandEventArgs   e)
{
  Label2.Text   =   "The   "   +   ((LinkButton)e.CommandSource).Text   +   "   button   has   just   been   clicked;   <br> ";
  //   我怎么可以得到Text= <%#   DataBinder.Eval(Container.DataItem,   "Catalog_ID ")呀?   %>
  }

------解决方案--------------------
用隐藏域试试啊