2
Reply

Finding Nested Control

Lee

Lee

Jun 1 2007 6:29 AM
2.2k
Hi

Not having much success with this, hopefully one of you could point me in the right direction.

I am trying to enable a required field validation on a textbox when a checkbox control is checked, but I'm having difficulty getting down to the validation control through nested controls.

I have the following:

  RequiredFieldValidator in DetailsView control
  DetailsView control is nested inside a GridView control

  GridView1
       --> DetailsView2
               --> RequiredFieldValidator (this is the control I need to get to using FindControl)

I'm using .Net 2.0 and C#.

Many thanks in advance.

Lee

Answers (2)