Click Here To Get Amazing Facebook Profile Covers,Status Messages

How to check type of control in asp.net

1 reply [Last post]
parth's picture
parth
User offline. Last seen 2 years 35 weeks ago. Offline
Joined: 09/20/2009

I have developed a web form where i have number of controls like dropdownlist, textboxes ,checkboxes and buttons.Now what i want is to clear all the textboxes on click event of button.I can iterate through all controls but how to determine type of each control.
Thanks in advance


perfect_storm's picture
perfect_storm
User offline. Last seen 2 years 9 weeks ago. Offline
Joined: 08/22/2009
type

if typeof ctrl is "TextBox"
'do what ever you want to do