Where is my validator?
- by Danny Chen
I have a validator in my page:
<asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="IdentifySEDSED1TxtDate" ErrorMessage="Significant Event Date 1 is missing" ValidType="SEDate">*</asp:RequiredFieldValidator>
I found that in Page_Load: (below is a screen shot from the Watch Window)
this.FindControl("rfv1") {Text = "*"}
rfv1 The name 'rfv1' does not exist in the current context
See, I can get this control with FindControl, but I can't get it using ID directly! What happens?