Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to identify the objects like editbox,button,image or a link in an application screen like a gmail login page having objects like username ,password, a Gmail icon
what would be the code for this.
Posted
Updated 14-Aug-14 4:34am
v2
Comments
PhilLenoir 14-Aug-14 10:15am    
Do you mean the controls in a web form? To enumerate use the controls collection.
ZurdoDev 14-Aug-14 10:20am    
What?
Member 11012952 14-Aug-14 10:36am    
it is sort of grabbing the screen of an application by grabbing the objects

1 solution

Try
C#
foreach (Control c in page)
{
 
      MessageBox.Show(" Type:"+ c.GetType());
  
}


This gives you the type of each control which you can then use to get the type you want.
 
Share this answer
 
Comments
Member 11012952 17-Aug-14 12:14pm    
is this called object grabbing
???

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