getting information about webcontrlos in a webpage
-
i need to write a code which would retrieve the information about the webcontrols in a webpage. i need to know the count and also what type of controls. i know that System.Reflection namespace can be used. but i do not know what class to use. can anybody help??:^)
Sonu
-
i need to write a code which would retrieve the information about the webcontrols in a webpage. i need to know the count and also what type of controls. i know that System.Reflection namespace can be used. but i do not know what class to use. can anybody help??:^)
Sonu
Hi Sonu,
Sonu.T wrote:
i need to know the count and also what type of controls
You can use the Controls collection of the WebForm to know the count of controls and also you can get the 'Type' objects from this collection. What for you need System.Reflection ?
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
-
i need to write a code which would retrieve the information about the webcontrols in a webpage. i need to know the count and also what type of controls. i know that System.Reflection namespace can be used. but i do not know what class to use. can anybody help??:^)
Sonu
I think Page.Controls collection will solve your problems. You can have all information about collection of web controls placed in a web page along with count. Neeraj