Click here to Skip to main content
14,775,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have this repeater , now want id and value of all text box which are in repeater using jquery and when their text change call jquery .



<div id="repeterDiv">
                                           <table class="grid">
                                               <asp:Repeater ID="Repeater1" runat="server" ClientIDMode="Static">
                                                   <HeaderTemplate>
                                                       <table>
                                                           <tr>
                                                               <td>HSCode
                                                               </td>

                                                               <td>Inhalt
                                                               </td>
                                                               <td>Amount</td>
                                                           </tr>
                                                       </table>
                                                   </HeaderTemplate>
                                                   <ItemTemplate>
                                                       <table class="elementTable,grid">
                                                           <tr>
                                                               <td>
                                                                   <asp:TextBox ID="txtGHSCode"  runat="server" ClientIDMode="Static" Width="100px"></asp:TextBox>

                                                               </td>
                                                               <td>
                                                                   <asp:TextBox ID="txtGInhalt" CssClass="textboxType" runat="server" ClientIDMode="Static" Width="60px"></asp:TextBox>

                                                               </td>

                                                               <td>
                                                                   <asp:TextBox ID="txtGAmount" runat="server" Enabled="false" Width="100px"></asp:TextBox>
                                                               </td>

                                                           </tr>
                                                       </table>
                                                   </ItemTemplate>

                                               </asp:Repeater>
                                           </table>
                                       </div>


do reply as soon as.
thank you.
Posted

Simply you can do like...
var allTextBoxes = $( "input[id*='txtGHSCode']" );
var allOtherTextBoxes = $( "input[id*='txtGInhalt']" );

Now, take these TextBoxes, loop through them and get value and attach the events...
Comments
Anita Gyamlani 19-Sep-17 2:42am
   
Solution is working..Thanks
   
Glad to hear that. Most welcome. :)
Thankx for response .
I got solution by var hsCode = $('#txtGHSCode').val().
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900