Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8375265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:07:52+00:00 2026-06-09T15:07:52+00:00

I have a repeater control and in each cell there is some text, bid

  • 0

I have a repeater control and in each cell there is some text, bid button, and a textbox for bid amount. Im trying to get the textbox value (Bid amount) when the user clicks the button in the same cell so I can validate the bid amount. Any help would be greatly appreciated.

Here is my html table code:

<table id="values" class="values" border="3">
<tr>
<td  align="center"  style="white-space:nowrap">
<span class="MainBgContent_UpperRight_Title" style="height:25px;max-height:25px">Your Bid: $
<asp:TextBox ID="tbBid" CssClass="bids" Style="width: 30px" runat="server" Text=''></asp:TextBox>

</span>                                                
<div style="height:10px;clear:both;"></div>

<div class="offer" style="width:100px;height:30px;line-height:20px;">                                                    
<asp:Button style="width:100px;height:30px;line-height:20px;"  Visible="true"  CssClass="btnSubmitBid"  ID="lbBid" Text="BID" runat="Server" CommandName="makeBid"    ></asp:Button>                                                    
</div>
<div style="height:20px;clear:both;"></div>
</td>
</tr>
</table>

I can get the id of the button via class name btnSubmitBid, but need to get the textbox value for that specific cell only.

thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:07:52+00:00Added an answer on June 9, 2026 at 3:07 pm

    In the javascript function for the click of the button, you can traverse the DOM tree to find the input. Since the button is in a div, which is in the cell, you need to get the button’s parent (div)’s parent (cell). Then find the first child (the span), and that span’s child:

    var bid = $(this).parent().parent().children()[0].children()[0];
    

    Or you can use the find function on the cell to look for the input:

    var bid = $(this).parent().parent().find("input");
    

    Or, use the closest function, although I’m not sure if there is a big performance difference, and you already know the structure to know how far up you need to look to find the cell:

    var bid = $(this).closest('td').find("input");
    

    This answer assumes there is only on input in the table. If there is more than one, you should look for the class of .bids instead of the element type of input.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a templated control (a repeater) listing some text and other markup. Each
I have Repeater Control as shown below. <asp:Repeater ID=rptCategory runat=server> <HeaderTemplate> <h2 class=art-logo-text style=margin-bottom:
I have a view in which I there is a repeater control wrapped with
I have a Repeater control that is creating a dynamic amount of CheckBoxList controls
I have a repeater control that houses several RadioButtonLists with various RadioButtons in each
I have a repeater control outputting some HTML. I want a table which outputs
I have a repeater control and some controls like dropdown/Buttons/Checklist for search as all
I have a repeater, and each item has a check box and radio button.
I have Repeater Control and in that i have code like this <div runat=server
I have a repeater control that contains an ItemTemplate containing a databound label and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.