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 7527599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:08:45+00:00 2026-05-30T04:08:45+00:00

Today I got an interview question as titled. For example, a Update Panel contains

  • 0

Today I got an interview question as titled.

For example, a Update Panel contains a Panel, the Panel contains a TextBox.

How can I get the TextBox ClientID?

The only I could think of that is:

  1. We can predict the TextBox ClientID depends on the ClientID mode and use getElementByID.

    i.e. getElementByID('ct100$MasterPageBody$ct100$UpdatePanelID$ct100$PanelID$ct100$TextBoxID')

  2. We can use JavaScript to parse the HTML, parse the input controls into arrays.

    i.e Assume we know we want to find the first UpdatePanel’s first Panel’s first TextBox.
    We can find it from myUpdatePanel[0] then get its children using JavaScript? (I am only guessing here)

  3. getElementByID('<%=MyTextBox.ClientID%>')

But assuming the TextBox is added dynamic, but what’s the proper way of doing it?

  • 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-05-30T04:08:46+00:00Added an answer on May 30, 2026 at 4:08 am

    You can access the control from a jQuery selector based on the end of the id like the example here:

    <asp:CheckBox ID="chkEnable" Text="My Checkbox" runat="server" />
    <script type="text/javascript">
        $(function() {
            var checked = $("input[id$=chkEnable]").attr("checked");
    
        });
    </script>
    

    Here’s an article for the exact thing:
    http://weblogs.asp.net/joelvarty/archive/2009/02/09/jquery-get-a-handle-on-a-server-element-in-javascript-without-using-lt-elem-clientid-gt.aspx

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

Sidebar

Related Questions

Got this question in an interview today, and its optimized solution stopped me cold
It means I can't see traffic i got today. Also is it only specific
Got asked this interesting interview question today. Explain in detail the process by which
This question got me today, my repositories should always return full objects? They can
I got this question today in an interview: write a function to calculate the
Today I got this question for which I think I answered very bad. I
I asked this goofy question earlier today and got good answers. I think what
Today we got an assignment to complete in lab (in two hours). The question
Just got this message today on user machines when pushing out an update to
Today I got Android ICS update. The system shows version Ice Cream Sandwich MR1.

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.