Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > User Control access fails in debug mode, works in release mode

Reply
Thread Tools

User Control access fails in debug mode, works in release mode

 
 
rbg.net@gmail.com
Guest
Posts: n/a
 
      01-17-2007
I have a custom usercontrol in ASP.NET 1.1 named BreadCrumb.ascx which
contains another control also called BreadCrumb.ascx within itself.

Thus the parent BreadCrumb.ascx control is simply a container of the
real (child) Breadcrumb.ascx control.

When I use this parent BreadCrumb.ascx user control within a page. I
can successfully access the page if the debug attribute for the
compilation element in web.config is set to false.

However when the debug attribute is set to true. The page access fails
with the error on this line in the
WINNT\.NETFramework\v1.1.4322\0jhhfgf.cs file :

object __ctrl = ASP.Breadcrumb_ascx
this.breadcrumb = __ctrl

It says cannot map this.breadcrumb to ASP.Breadcrumb_ascx
NOTE THAT THE ABOVE IS THE COMPILER GENERATED .CS FILE

Where ASP.Breadcrumb_ascx is the parent BreadCrumb (container) control
and this.breadcrumb refers to the child Breadcrumb control.

The error is correct in itself, however the point that I dont
understand is why the code works perfectly fine when debug = false, but
fails when debug = true in web.config. Obviously in the debug = false
case the COMPILER GENERATED .CS file isn't accessed.

What I need to understand is why such error happens when debug = true.
Essentially why does the compiler generate a CODE which maps
this.breadcrumb TO ASP.BREADCRUMB_ASCX.

TIA

 
Reply With Quote
 
 
 
 
Peter Zolja
Guest
Posts: n/a
 
      01-31-2007
> What I need to understand is why such error happens when debug = true.
> Essentially why does the compiler generate a CODE which maps
> this.breadcrumb TO ASP.BREADCRUMB_ASCX.


Have you tried debugging your code with VS debugging? I'm not sure how easy
it is with VS2003, but in VS2005 is fairly easy to debug.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Control access fails in debug mode, works in release mode rbg.net@gmail.com ASP .Net Web Controls 1 01-31-2007 12:21 AM
User Control access fails in debug mode, works in release mode rbg ASP .Net 0 01-17-2007 10:51 PM
Response.Redirect is slooow in debug mode, ok in release mode =?Utf-8?B?TWF4?= ASP .Net 0 02-11-2006 12:37 AM
Debug mode dll's vs release mode dll's? Dave ASP .Net 0 02-20-2004 03:49 AM



Advertisments