Multiple controls with the same ID 'CaptchaImage' were found

2 posts, 0 answers
  1. Charles
    Charles avatar
    32 posts
    Member since:
    Mar 2008

    Posted 13 Aug 2009 Link to this post

    Hi,

    Just beginning to use this control - not a very good start!

    If I place a RadCaptcha control on the page, I get this exception:

    Multiple controls with the same ID 'CaptchaImage' were found. FindControl requires that controls have unique IDs.

    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: Multiple controls with the same ID 'CaptchaImage' were found. FindControl requires that controls have unique IDs.

    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): Multiple controls with the same ID 'CaptchaImage' were found. FindControl requires that controls have unique IDs.]
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +273
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +320
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +320
       System.Web.UI.Control.EnsureNamedControlsTable() +61
       System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +222
       System.Web.UI.Control.FindControl(String id) +12
       Telerik.Web.UI.RadCaptcha.Render(HtmlTextWriter writer) +28
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.Page.Render(HtmlTextWriter writer) +29
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
    


    Using the following markup:

    <%

    @ Page Language="VB" AutoEventWireup="false" CodeFile="Captcha.aspx.vb" Inherits="Captcha" %>

     

    <%

    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

     

    <!

     

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     

    <

     

    html xmlns="http://www.w3.org/1999/xhtml">

     

    <

     

    head runat="server">

     

     

    <title></title>

     

    </

     

    head>

     

    <

     

    body>

     

     

    <form id="form1" runat="server">

     

     

    <div>

     

     

    <asp:ScriptManager runat="server" />

     

     

     

    <telerik:RadCaptcha ProtectionMode="Captcha" runat="server" />

     

     

    </div>

     

     

    </form>

     

    </

     

    body>

     

    </

     

    html>


    Any ideas?

     

  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 14 Aug 2009 Link to this post

    Hello Charles,

    I tested the source code that you provided but I did not experience any problems when running the application. You can see this on the attached video that I have captured while running the project.

    Could you please provide more information about your problem and your project setup? We need to have a clearer picture of your scenario in order to find what's causing this unexpected behavior.

    Additionally, here is the full source code of the project that I tested and link to the online documentation of RadCaptcha:

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <title></title
    </head> 
    <body> 
        <form id="form1" runat="server"
        <div> 
            <asp:ScriptManager runat="server" /> 
            <telerik:RadCaptcha ID="RadCaptcha1" ProtectionMode="Captcha" runat="server" /> 
        </div> 
        </form> 
    </body> 
    </html> 
     


    All the best,
    Pero
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top