Avatar of dba123
dba123

asked on 

Control referenced by the ControlToValidate property cannot be validated

Can you not validate a checkboxlist or something?  Here's what I have:

 <tr><td><asp:CustomValidator Enabled="true" ID="cusValEntreeSelections" ControlToValidate="chkbxEntreeList" runat="server" onservervalidate="cusValEntreeSelections_ServerValidate" /></td></tr>
 <tr><td align="right" ><asp:CheckBoxList ID="chkbxEntreeList" TextAlign="right" RepeatColumns="2" RepeatLayout="Table" RepeatDirection="Vertical" runat="server" /> </td></tr>            


Runtime Error:
Control 'chkbxEntreeList' referenced by the ControlToValidate property of 'cusValEntreeSelections' cannot be validated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Control 'chkbxEntreeList' referenced by the ControlToValidate property of 'cusValEntreeSelections' cannot be validated.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Control 'chkbxEntreeList' referenced by the ControlToValidate property of 'cusValEntreeSelections' cannot be validated.]
   System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(String name, String propertyName) +1840561
   System.Web.UI.WebControls.CustomValidator.ControlPropertiesValid() +32
   System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +33
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
ASP.NET

Avatar of undefined
Last Comment
ajitha75

8/22/2022 - Mon