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

  • Home
  • SEARCH
  • 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 8431273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:48:38+00:00 2026-06-10T05:48:38+00:00

I have a asp control button that when I look at it in IE

  • 0

I have a asp control button that when I look at it in IE 9 developers tool I see it’s id is
ctl00_m_g_0e632166_55b3_4470_971c_bd562d4904c8_ctl00_Button2.

Is there a way I can access this id in the c# code?
Something like Button2.getID?

Curently I am inserting javascript code that will need to find this control to do various things and the method I am using isn’t good, it’s basically checking if the suffix of all input id’s is Button2. I want to find a better way…

Thanks

  • 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-10T05:48:40+00:00Added an answer on June 10, 2026 at 5:48 am

    Button2.ClientID is what you’re looking for i think.

    docs: http://msdn.microsoft.com/en-us/library/system.web.ui.control.clientid.aspx

    You can also control how this is set by setting the ClientIDMode

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

Sidebar

Related Questions

I thought that this was easier… I have a asp:hyperlink control, with target=_blank ,
For the following scenario: I have an ASP.NET FileUpload control and a Button that
I have an <asp:Button ID=btnExport> control inside of an UpdatePanel. When that button is
I have a asp.net button control. My requirement is such that upon clicking the
I have an ASP.NET control that outputs a button to the screen and I
I have a asp image control. ImageUrl=images/avator.jpg. I'm changing this picture on the server
I have an ASP.Net Calendar control that, on DayRender, loops through a list of
I have an ASP.NET user control (.ascx file). In this user control I want
I have a HiddenField control that is created within my ASP.NET server control. I
I have an ASP.NET user control that contains a text box control and a

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.