Friday, February 26, 2016

Use dynamic to fish for web forms controls?

The dynamic trick here for catching a Dog instead of an Animal can be used to catch a specific web forms control like a Textbox if a list of controls (from inside a Panel perhaps) are just pushed to a method that takes a control. This should allow you to easily find the Textbox if you don't know where it will be mixed in with other controls and do things to it specific to a Textbox.

No comments:

Post a Comment