This is a migrated thread and some comments may be shown as answers.

Multiple controls with the same ID 'CaptchaImage' were found

1 Answer 116 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 13 Aug 2009, 09:04 AM
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?

 

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 14 Aug 2009, 07:46 AM
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.
Tags
Captcha
Asked by
Charles
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or