473,378 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Error: Multiple controls with the same ID

When I view any page in my application a second time, I recieve the
following error:

[HttpException (0x80004005): Multiple controls with the same ID
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId, String
type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

If I close the browser and Visual Studio, and then reopen and rebuild the
application I can look at one page in the application one more time, but
then I recieve the error again. What can I do to prevent this error from
occurring? If there is any other information that might help figure out the
problem, I will be happy to give it to you. Here is the entire error page I
recieve:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple controls with the same ID 'TitleBanner:_ctl0' were found. Trace
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 'TitleBanner:_ctl0' were found. Trace 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
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId, String
type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
Request Details
Session Id: 3nolkd55t1wljc452octxq55 Request Type: GET
Time of Request: 7/11/2005 5:29:15 PM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000021 0.000021
aspx.page Begin PreRender 0.000235 0.000215
aspx.page End PreRender 0.000260 0.000024
Unhandled Execution Error
Multiple controls with the same ID 'TitleBanner:_ctl0' were found.
Trace requires that controls have unique IDs.
at System.Web.TraceContext.AddNewControl(String id, String parentId,
String type, Int32 viewStateSize)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Page.ProcessRequestMain() 0.000584 0.000324
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size
Bytes (excluding children)
__PAGE ASP.index_aspx 0 0
_ctl0 System.Web.UI.LiteralControl 0 0
TitleBar System.Web.UI.HtmlControls.HtmlGenericControl 0 0
_ctl1 System.Web.UI.LiteralControl 0 0
_ctl2 System.Web.UI.ResourceBasedLiteralControl 0 0
Form1 System.Web.UI.HtmlControls.HtmlForm 0 0
_ctl3 System.Web.UI.LiteralControl 0 0
TitleBanner ASP.Banner_ascx 0 0
TitleBanner:lblTitle System.Web.UI.WebControls.Label 0 0
TitleBanner:_ctl0 System.Web.UI.LiteralControl 0 0
Cookies Collection
Name Value Size
ASP.NET_SessionId 3nolkd55t1wljc452octxq55 42
Headers Collection
Name Value
Connection Keep-Alive
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Cookie ASP.NET_SessionId=3nolkd55t1wljc452octxq55
Host localhost
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Server Variables
Name Value
ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash,
application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:en-us
HTTP_COOKIE:ASP.NET_SessionId=3nolkd55t1wljc452oct xq55 HTTP_HOST:localhost
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
ALL_RAW Connection: Keep-Alive Accept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword,
*/* Accept-Encoding: gzip, deflate Accept-Language: en-us Cookie:
ASP.NET_SessionId=3nolkd55t1wljc452octxq55 Host: localhost User-Agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
APPL_MD_PATH /LM/W3SVC/1/ROOT
APPL_PHYSICAL_PATH c:\inetpub\wwwroot\
AUTH_TYPE
AUTH_USER
AUTH_PASSWORD
LOGON_USER
REMOTE_USER
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
LOCAL_ADDR 127.0.0.1
PATH_INFO /index.aspx
PATH_TRANSLATED c:\inetpub\wwwroot\index.aspx
QUERY_STRING
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT 1361
REQUEST_METHOD GET
SCRIPT_NAME /index.aspx
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/5.1
URL /index.aspx
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_COOKIE ASP.NET_SessionId=3nolkd55t1wljc452octxq55
HTTP_HOST localhost
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)

Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 19 '05 #1
3 2756
I had what appears to be the same problem about two weeks ago. For some
reason, when I dynamically moved an HtmlTable from one container to another
(Page into PlaceHolder), the runtime dynamically generated a name for one of
the Table's children. It took a little while to track it but basically if
you recursively iterate through the controls collections of the controls on
your page (or, in your case, the controls in TitleBanner), and Trace.Write()
the control IDs and Type, you should be able to track it pretty effectively.
Once you find the "problem child", give it a name and you should be OK.

HTH
----------------
Dave Fancher
http://www.davefancher.com

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u%****************@TK2MSFTNGP14.phx.gbl...
When I view any page in my application a second time, I recieve the
following error:

[HttpException (0x80004005): Multiple controls with the same ID
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId, String
type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

If I close the browser and Visual Studio, and then reopen and rebuild the
application I can look at one page in the application one more time, but
then I recieve the error again. What can I do to prevent this error from
occurring? If there is any other information that might help figure out
the problem, I will be happy to give it to you. Here is the entire error
page I recieve:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple controls with the same ID 'TitleBanner:_ctl0' were found. Trace
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 'TitleBanner:_ctl0' were found. Trace 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
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId, String
type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032
Request Details
Session Id: 3nolkd55t1wljc452octxq55 Request Type: GET
Time of Request: 7/11/2005 5:29:15 PM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000021 0.000021
aspx.page Begin PreRender 0.000235 0.000215
aspx.page End PreRender 0.000260 0.000024
Unhandled Execution Error
Multiple controls with the same ID 'TitleBanner:_ctl0' were found.
Trace requires that controls have unique IDs.
at System.Web.TraceContext.AddNewControl(String id, String
parentId, String type, Int32 viewStateSize)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Page.ProcessRequestMain() 0.000584 0.000324
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size
Bytes (excluding children)
__PAGE ASP.index_aspx 0 0
_ctl0 System.Web.UI.LiteralControl 0 0
TitleBar System.Web.UI.HtmlControls.HtmlGenericControl 0 0
_ctl1 System.Web.UI.LiteralControl 0 0
_ctl2 System.Web.UI.ResourceBasedLiteralControl 0 0
Form1 System.Web.UI.HtmlControls.HtmlForm 0 0
_ctl3 System.Web.UI.LiteralControl 0 0
TitleBanner ASP.Banner_ascx 0 0
TitleBanner:lblTitle System.Web.UI.WebControls.Label 0 0
TitleBanner:_ctl0 System.Web.UI.LiteralControl 0 0
Cookies Collection
Name Value Size
ASP.NET_SessionId 3nolkd55t1wljc452octxq55 42
Headers Collection
Name Value
Connection Keep-Alive
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Cookie ASP.NET_SessionId=3nolkd55t1wljc452octxq55
Host localhost
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322)
Server Variables
Name Value
ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash,
application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:en-us
HTTP_COOKIE:ASP.NET_SessionId=3nolkd55t1wljc452oct xq55 HTTP_HOST:localhost
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322)
ALL_RAW Connection: Keep-Alive Accept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, application/x-shockwave-flash,
application/msword, */* Accept-Encoding: gzip, deflate Accept-Language:
en-us Cookie: ASP.NET_SessionId=3nolkd55t1wljc452octxq55 Host: localhost
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
APPL_MD_PATH /LM/W3SVC/1/ROOT
APPL_PHYSICAL_PATH c:\inetpub\wwwroot\
AUTH_TYPE
AUTH_USER
AUTH_PASSWORD
LOGON_USER
REMOTE_USER
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
LOCAL_ADDR 127.0.0.1
PATH_INFO /index.aspx
PATH_TRANSLATED c:\inetpub\wwwroot\index.aspx
QUERY_STRING
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT 1361
REQUEST_METHOD GET
SCRIPT_NAME /index.aspx
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/5.1
URL /index.aspx
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_COOKIE ASP.NET_SessionId=3nolkd55t1wljc452octxq55
HTTP_HOST localhost
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)

Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Nov 19 '05 #2
I believe I already know who the "Problem Child" is (the user control
TitleBanner has very few controls in it to begin with). However, giving it a
name would not be an acceptable solution in my case because it is a control
(or set of controls, actually) of which there may be 1, 3, 10, 50, or any
amount, meaning I cannot give them all static names because I will always
need a different number of the controls. I think the real solution (if I can
figure out exactly how to do it) would be to remove the previously existing
control with that ID from memory, which seems to be what happens when I
close the browser and Visual Studio and then rebuild the application. Any
ideas? If you want me to send you the code for the user control, let me know
and I can either attach it to a newsgroup message or email it to you.
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Dave Fancher" <da**@remove.davefancher.com> wrote in message
news:Vv********************@comcast.com...
I had what appears to be the same problem about two weeks ago. For some
reason, when I dynamically moved an HtmlTable from one container to another
(Page into PlaceHolder), the runtime dynamically generated a name for one
of the Table's children. It took a little while to track it but basically
if you recursively iterate through the controls collections of the controls
on your page (or, in your case, the controls in TitleBanner), and
Trace.Write() the control IDs and Type, you should be able to track it
pretty effectively. Once you find the "problem child", give it a name and
you should be OK.

HTH
----------------
Dave Fancher
http://www.davefancher.com

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u%****************@TK2MSFTNGP14.phx.gbl...
When I view any page in my application a second time, I recieve the
following error:

[HttpException (0x80004005): Multiple controls with the same ID
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId,
String type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

If I close the browser and Visual Studio, and then reopen and rebuild the
application I can look at one page in the application one more time, but
then I recieve the error again. What can I do to prevent this error from
occurring? If there is any other information that might help figure out
the problem, I will be happy to give it to you. Here is the entire error
page I recieve:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple controls with the same ID 'TitleBanner:_ctl0' were found. Trace
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 'TitleBanner:_ctl0' were found. Trace 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
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId,
String type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032
Request Details
Session Id: 3nolkd55t1wljc452octxq55 Request Type: GET
Time of Request: 7/11/2005 5:29:15 PM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000021 0.000021
aspx.page Begin PreRender 0.000235 0.000215
aspx.page End PreRender 0.000260 0.000024
Unhandled Execution Error
Multiple controls with the same ID 'TitleBanner:_ctl0' were found.
Trace requires that controls have unique IDs.
at System.Web.TraceContext.AddNewControl(String id, String
parentId, String type, Int32 viewStateSize)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Page.ProcessRequestMain() 0.000584 0.000324
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate
Size Bytes (excluding children)
__PAGE ASP.index_aspx 0 0
_ctl0 System.Web.UI.LiteralControl 0 0
TitleBar System.Web.UI.HtmlControls.HtmlGenericControl 0 0
_ctl1 System.Web.UI.LiteralControl 0 0
_ctl2 System.Web.UI.ResourceBasedLiteralControl 0 0
Form1 System.Web.UI.HtmlControls.HtmlForm 0 0
_ctl3 System.Web.UI.LiteralControl 0 0
TitleBanner ASP.Banner_ascx 0 0
TitleBanner:lblTitle System.Web.UI.WebControls.Label 0 0
TitleBanner:_ctl0 System.Web.UI.LiteralControl 0 0
Cookies Collection
Name Value Size
ASP.NET_SessionId 3nolkd55t1wljc452octxq55 42
Headers Collection
Name Value
Connection Keep-Alive
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Cookie ASP.NET_SessionId=3nolkd55t1wljc452octxq55
Host localhost
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322)
Server Variables
Name Value
ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash,
application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:en-us
HTTP_COOKIE:ASP.NET_SessionId=3nolkd55t1wljc452oct xq55
HTTP_HOST:localhost HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; .NET CLR 1.1.4322)
ALL_RAW Connection: Keep-Alive Accept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, application/x-shockwave-flash,
application/msword, */* Accept-Encoding: gzip, deflate Accept-Language:
en-us Cookie: ASP.NET_SessionId=3nolkd55t1wljc452octxq55 Host: localhost
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
APPL_MD_PATH /LM/W3SVC/1/ROOT
APPL_PHYSICAL_PATH c:\inetpub\wwwroot\
AUTH_TYPE
AUTH_USER
AUTH_PASSWORD
LOGON_USER
REMOTE_USER
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
LOCAL_ADDR 127.0.0.1
PATH_INFO /index.aspx
PATH_TRANSLATED c:\inetpub\wwwroot\index.aspx
QUERY_STRING
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT 1361
REQUEST_METHOD GET
SCRIPT_NAME /index.aspx
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/5.1
URL /index.aspx
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_COOKIE ASP.NET_SessionId=3nolkd55t1wljc452octxq55
HTTP_HOST localhost
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)

Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/


Nov 19 '05 #3
Go ahead and send it to me (da**@remove.davefancher.com - remember to remove
"remove"). I'll take a look at it this afternoon.

HTH
----
http://www.davefancher.com
"Nathan Sokalski" wrote:
I believe I already know who the "Problem Child" is (the user control
TitleBanner has very few controls in it to begin with). However, giving it a
name would not be an acceptable solution in my case because it is a control
(or set of controls, actually) of which there may be 1, 3, 10, 50, or any
amount, meaning I cannot give them all static names because I will always
need a different number of the controls. I think the real solution (if I can
figure out exactly how to do it) would be to remove the previously existing
control with that ID from memory, which seems to be what happens when I
close the browser and Visual Studio and then rebuild the application. Any
ideas? If you want me to send you the code for the user control, let me know
and I can either attach it to a newsgroup message or email it to you.
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Dave Fancher" <da**@remove.davefancher.com> wrote in message
news:Vv********************@comcast.com...
I had what appears to be the same problem about two weeks ago. For some
reason, when I dynamically moved an HtmlTable from one container to another
(Page into PlaceHolder), the runtime dynamically generated a name for one
of the Table's children. It took a little while to track it but basically
if you recursively iterate through the controls collections of the controls
on your page (or, in your case, the controls in TitleBanner), and
Trace.Write() the control IDs and Type, you should be able to track it
pretty effectively. Once you find the "problem child", give it a name and
you should be OK.

HTH
----------------
Dave Fancher
http://www.davefancher.com

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u%****************@TK2MSFTNGP14.phx.gbl...
When I view any page in my application a second time, I recieve the
following error:

[HttpException (0x80004005): Multiple controls with the same ID
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId,
String type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

If I close the browser and Visual Studio, and then reopen and rebuild the
application I can look at one page in the application one more time, but
then I recieve the error again. What can I do to prevent this error from
occurring? If there is any other information that might help figure out
the problem, I will be happy to give it to you. Here is the entire error
page I recieve:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple controls with the same ID 'TitleBanner:_ctl0' were found. Trace
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 'TitleBanner:_ctl0' were found. Trace 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
'TitleBanner:_ctl0' were found. Trace requires that controls have unique
IDs.]
System.Web.TraceContext.AddNewControl(String id, String parentId,
String type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
System.Web.UI.Page.ProcessRequestMain() +1608

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032
Request Details
Session Id: 3nolkd55t1wljc452octxq55 Request Type: GET
Time of Request: 7/11/2005 5:29:15 PM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000021 0.000021
aspx.page Begin PreRender 0.000235 0.000215
aspx.page End PreRender 0.000260 0.000024
Unhandled Execution Error
Multiple controls with the same ID 'TitleBanner:_ctl0' were found.
Trace requires that controls have unique IDs.
at System.Web.TraceContext.AddNewControl(String id, String
parentId, String type, Int32 viewStateSize)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
at System.Web.UI.Page.ProcessRequestMain() 0.000584 0.000324
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate
Size Bytes (excluding children)
__PAGE ASP.index_aspx 0 0
_ctl0 System.Web.UI.LiteralControl 0 0
TitleBar System.Web.UI.HtmlControls.HtmlGenericControl 0 0
_ctl1 System.Web.UI.LiteralControl 0 0
_ctl2 System.Web.UI.ResourceBasedLiteralControl 0 0
Form1 System.Web.UI.HtmlControls.HtmlForm 0 0
_ctl3 System.Web.UI.LiteralControl 0 0
TitleBanner ASP.Banner_ascx 0 0
TitleBanner:lblTitle System.Web.UI.WebControls.Label 0 0
TitleBanner:_ctl0 System.Web.UI.LiteralControl 0 0
Cookies Collection
Name Value Size
ASP.NET_SessionId 3nolkd55t1wljc452octxq55 42
Headers Collection
Name Value
Connection Keep-Alive
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Cookie ASP.NET_SessionId=3nolkd55t1wljc452octxq55
Host localhost
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322)
Server Variables
Name Value
ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash,
application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:en-us
HTTP_COOKIE:ASP.NET_SessionId=3nolkd55t1wljc452oct xq55
HTTP_HOST:localhost HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; .NET CLR 1.1.4322)
ALL_RAW Connection: Keep-Alive Accept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, application/x-shockwave-flash,
application/msword, */* Accept-Encoding: gzip, deflate Accept-Language:
en-us Cookie: ASP.NET_SessionId=3nolkd55t1wljc452octxq55 Host: localhost
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
APPL_MD_PATH /LM/W3SVC/1/ROOT
APPL_PHYSICAL_PATH c:\inetpub\wwwroot\
AUTH_TYPE
AUTH_USER
AUTH_PASSWORD
LOGON_USER
REMOTE_USER
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
LOCAL_ADDR 127.0.0.1
PATH_INFO /index.aspx
PATH_TRANSLATED c:\inetpub\wwwroot\index.aspx
QUERY_STRING
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT 1361
REQUEST_METHOD GET
SCRIPT_NAME /index.aspx
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/5.1
URL /index.aspx
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_COOKIE ASP.NET_SessionId=3nolkd55t1wljc452octxq55
HTTP_HOST localhost
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)

Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/



Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Varad | last post by:
Hi all Pls give me some insight as to what I should be doing. I have a form where I have 20 text boxes and when an user submits the form I save it to a database. When they want to retrieve it, I...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
9
by: JTrigger | last post by:
When I compile my project using the IDE on a development machine it works just fine. When I compile it on the server using csc.exe, I get the following error when I try to bring it up in the web...
1
by: Mike Smith | last post by:
I am attempting to create a dynamic multi-level tab strip from a database using linkbuttons. I can get the controls added to the page on the first page load, but on post back I get the mutiple...
5
by: Nathan Sokalski | last post by:
When I view my index.aspx page any time after the first time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize)...
7
by: Snuyt | last post by:
When I add a control to a panel, I get this error : "Controls created on one thread cannot be parented to a control on a different thread." Does anyone knows what I'm doing wrong ?
2
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313...
1
by: Jimi200478 | last post by:
Hello All, Okay....here goes.We are currently in the process of updating our servers to windows 2003 server from Windows 2k. Before making any changes to our production environment, we ran the...
2
by: CtrlAltDel | last post by:
I have an ASP.NET application that runs just fine on our servers (Win2003, in dev/staging/prod) when the debug attribute of <system.web><compilation /></system.webis set to true, thusly: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.