日期:2014-05-17  浏览次数:20504 次

Repeater里放Itemtemplate 后台如何取到Itemtemplate里TextBox的值
页面代码
<asp:Repeater ID="rep_message" runat="server">
  <HeaderTemplate>
  <tbody>
  </HeaderTemplate>
  <ItemTemplate>
  <tr class="odd">
  <td align="center">
  <asp:TextBox ID="txtNo" runat="server" MaxLength="2" Style="width: 20px;" CommandName="お知らせSEQ"
  Text='<%#Eval("INFO_SEQ") %>'></asp:TextBox>
  </td>
  <td align="center">
  <asp:TextBox ID="txtDate" runat="server" MaxLength="10" Style="width: 70px;" CommandName="登録日付"
  Text='<%#Eval("USER_ENTRY_YMD","{0:yyyy/MM/dd}")%>'></asp:TextBox>
  </td>
  <td align="left">
  <asp:TextBox ID="txtMessage" runat="server" Style="width: 570px;" CommandName="お知らせ内容"
  Text='<%#Eval("INFO_NAIYO") %>'></asp:TextBox>
  </td>
  <td colspan="2">
  <nobr>
  <asp:TextBox ID="txtDateFrom" runat="server" MaxLength="10" style="width:70px;" CommandName = "表示期間(From)" 
  Text = '<%#Eval("HYOJI_YMD_FROM","{0:yyyy/MM/dd}")%>'></asp:TextBox>
  ~<asp:TextBox ID="txtDateTo" runat="server" MaxLength="10" style="width:70px;" CommandName = "表示期間(To)" 
  Text = '<%#Eval("HYOJI_YMD_TO","{0:yyyy/MM/dd}") %>'></asp:TextBox>
  </nobr>
  </td>
  </tr>
  </ItemTemplate>
  <AlternatingItemTemplate>
  <tr class="even">
  <td align="center">
  <asp:TextBox ID="txtNo" runat="server" MaxLength="2" Style="width: 20px;" CommandName="お知らせSEQ"
  Text='<%#Eval("INFO_SEQ") %>'></asp:TextBox>
  </td>
  <td align="center">
  <asp:TextBox ID="txtDate" runat="server" MaxLength="10" Style="width: 70px;" CommandName="登録日付"
  Text='<%#Eval("USER_ENTRY_YMD","{0:yyyy/MM/dd}") %>'></asp:TextBox>
  </td>
  <td align="left">
  <asp:TextBox ID="txtMessage" runat="server" Style="width: 570px;" CommandName="お知らせ内容"
  Text='<%#Eval("INFO_NAIYO") %>'>