首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

提交数据时获取双重绑定的Repeater中子Repeater的text的文本值?解决思路

2012-09-14 
提交数据时获取双重绑定的Repeater中子Repeater的text的文本值?asp:Repeater IDparentRepeater runat

提交数据时获取双重绑定的Repeater中子Repeater的text的文本值?
<asp:Repeater ID="parentRepeater" runat="server" OnItemDataBound="parentRepeater_ItemDataBound">
  <ItemTemplate>
  <%# Eval("FieldName")%>
  <!-- 子Repeater开始 -->
  <asp:Repeater ID="childRepeater" runat="server">
  <ItemTemplate>
  <li><%# Eval("FieldName")%>:<asp:TextBox ID="FieldTexValue" runat="server"></asp:TextBox></li>
  </ItemTemplate>
  <HeaderTemplate><ul></HeaderTemplate>
<FooterTemplate></ul></FooterTemplate>
  </asp:Repeater>
  <!-- 子Repeater结束 -->
  </ItemTemplate>
  </asp:Repeater>


我就是想在insert SQL语句时获取到 FieldTexValue的值

[解决办法]
var count=$("#parentRepeater").find("input[id*='FieldTexValue']").length;//textbox的數量;

$("#parentRepeater").find("li").each(function(){
alert($(this).find("input[id*='FieldTexValue']").val());//文本框的值
});

热点排行