Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
find id of input(text) in asp.net
Posted
Comments
Al Moje 29-Dec-11 1:02am    
Not clear question...
Ankur\m/ 29-Dec-11 1:17am    
id or value? on the server side or client side?
RaviRanjanKr 29-Dec-11 18:29pm    
Not Clear. Please be more specific while asking question. we need more information.

1 solution

if you want to find id of input control from text of it.. try this javascript function..

JavaScript
function getID()
{
   var coltrols = document.getElementByTagName('input');
   var id="";
   for(var i=0;i<controls.length;i++)
   {
      if(controls[i].value == 'your value')
      {
          id=controls[i].name;
          break;
      }
   }
  
   return id;
}


hope it helps..
 
Share this answer
 
v2

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