The following code works when I use it to access controls in a form. I'm trying to access controls within templatefield in detailsview to accomplish the same function. Please help. Thanks.
If NationalOrLocal.SelectedValue = "National"Then
RequiredFieldValidatorCorpCity.Enabled = True
RequiredFieldValidatorCorpState.Enabled = True
Else
RequiredFieldValidatorCorpCity.Enabled = False
RequiredFieldValidatorCorpState.Enabled = False
EndIf
If NationalOrLocal.SelectedValue = "National"Then
RequiredFieldValidatorCorpCity.Enabled = True
RequiredFieldValidatorCorpState.Enabled = True
Else
RequiredFieldValidatorCorpCity.Enabled = False
RequiredFieldValidatorCorpState.Enabled = False
EndIf