FindControl and Inheritance

Namecheap AuctionsNamecheap Auctions
NamecheapNamecheap
SpaceshipSpaceship
Watch

itags.org

New Member
Impact
0
:hehe::hehe: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.
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?:hehe::hehe:
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back