Theme css files not being applied

Last post 10-05-2006 5:58 PM by leidegre. 1 replies.

Sort Posts:

  • Theme css files not being applied

    09-21-2006, 7:21 AM
    • Member
      404 point Member
    • Yazilliclick
    • Member since 03-12-2003, 4:04 PM
    • NS, Canada
    • Posts 110
    I've got a website with an App_Themes folder with a Default folder in there and some css files in the Default folder.

    My page has the Theme directive set to Default.

    My problem is that only 3 of my css files out of 5 are being applied currently.  Does anybody know what would cause this?
    Could be WAAAY off in any suggestions I give in posts, so be on the lookout for stupidity :P
  • Re: Theme css files not being applied

    10-05-2006, 5:58 PM
    • Member
      112 point Member
    • leidegre
    • Member since 10-05-2006, 5:33 PM
    • Sweden
    • Posts 55

    I'm posting to confirm your problem. However, your problem might be caused by  a diffrent reason.

     At one place I was adding some client script inclide in the OnInit event, however, I choose to override event handlers rather than hook up events, since that produce a better looking and more dynamic code for me, but sometimes I forget to call the base method, and that could cause a problem.

    e.g.

    The Page.OnInit method does the following

     

    protected internal override void OnInit(EventArgs e)
    {
          base.OnInit(e);
          if (this._theme != null)
          {
                this._theme.SetStyleSheet();
          }
          if (this._styleSheet != null)
          {
                this._styleSheet.SetStyleSheet();
          }
    }


    Obviously by not calling the base.OnInit method on my derived Page class would ignore the inclusion of theme files.

    If this is not why you have a problem,  try using either reflection or some property to invoke this methods somewhere in your code to make things happen, it could cause more problems but it might lead you on the right track.

    Regard,
    John 

Page 1 of 1 (2 items)