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
Button2.ClientIDis 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