07-26-2009, 03:12 AM
| THREAD STARTER
#1 (permalink)
|
| First Time Poster! Join Date: Jul 2009 Location: Peking
Posts: 1
| FindControl and Inheritance   In V1.1 I used an inherited class â' BaseGrid - to process initialization and events for a DataGrid control. The actual control is defined in the pages that inherit from the BaseGrid class and they all use the same control ID. ????: NamePros.com http://www.namepros.com/programming/599023-findcontrol-and-inheritance.html
In the Page-Init event in BaseClass I used FindControl with the controls common name to get the actual control at runtime.
Using almost the same set-up in V2 never finds the control. I have switched to a GridView control rather than a DataGrid but otherwise the code is the same.
I have viewed BaseGrid â'thisâ' in the Watch window and canâ't see the GridView or any other server controls anywhere in any Controls collection. Any ideas on what code to use? 
__________________ I'm good at Dotnet,Database,Microsoft Technology,Java,Mail,Programming,Network,Software. ..
I'm Microsoft, I'm Sun, I'm Apple, I'm Oracle, I'm Google...
Hahaha, It's joke,the world the joke... |
| |