Lee

Lee

  • NA
  • 5
  • 0

Finding Nested Control

Jun 1 2007 6:29 AM
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)