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

Discussion in 'ASP .Net' started by rbg, Jan 17, 2007.

  1. rbg

    rbg Guest

    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
    rbg, Jan 17, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave
    Replies:
    0
    Views:
    621
  2. =?Utf-8?B?TWF4?=
    Replies:
    0
    Views:
    454
    =?Utf-8?B?TWF4?=
    Feb 11, 2006
  3. sujeet
    Replies:
    5
    Views:
    565
    Bart van Ingen Schenau
    Sep 16, 2007
  4. Replies:
    1
    Views:
    238
    Peter Zolja
    Jan 31, 2007
  5. Replies:
    1
    Views:
    194
    Peter Zolja
    Jan 31, 2007
Loading...

Share This Page