CSS Woes

Discussion in 'ASP .Net' started by Uriah Piddle, Aug 31, 2006.

  1. Uriah Piddle

    Uriah Piddle Guest

    Hi,

    I'm new with ASP.NET 2 so please bear with me. I created a website with VS
    2005 and enabled master pages and themes like this in WebConfig:

    <pages masterPageFile="~/Template.master" theme="DefaultTheme" />

    For several days I could edit the CSS file to format Template.master and
    then all of a sudden, it quit and no matter what I do, the template uses the
    settings in the CSS file as they existed two days ago. Even if I delete all
    text in the CSS file, the settings still persist and are applied to the
    Template. If I remove the reference to the theme, then the settings are gone
    and the Template looses its formatting. I tried adding a reference to the
    CSS file in the header of the Template page but that was no good either.

    Please help. Thanks.

    Steve
     
    Uriah Piddle, Aug 31, 2006
    #1
    1. Advertising

  2. Uriah Piddle

    clintonG Guest

    // The .css file must be in the same folder as the Theme...

    App_Themes <folder>
    DefaultTheme <folder>
    DefaultTheme.css

    // The simple declaration of the Theme manages accessing and applying the
    styles declared in the .css file.
    <pages ... theme="DefaultTheme" />

    // You can indeed test the Theme and the CSS stylesheet by removing the
    theme attribute of the web.config pages section. Then declare the them is
    each content page

    <%@ Page
    Language="C#"
    CodeFile="..."
    Inherits="..."
    MasterPageFile="~/Masters/DefaultMaster.master"
    Theme="DefaultTheme" %>

    That's it. If you continue to "lose" state of the page display's style you
    could be victimized by Visual Studio and/or ASP.NET bugs. There's quite a
    number of performance and stability issues that persist. For me it was
    really really bad on a previous machine that had Beta 2 installed before
    installing RTM 2.0.
    So what I learned is where to go to delete the cached build which exists
    at...

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\<projectName>

    Deleting that and then selecting rebuild from the Visual Studio menu clears
    the cache of the compiled page class(es) which is how ASP.NET lays it claim
    to fame to run fast once the intial compile has been performed. The SNAFU is
    Windows puts file locks on the <projectName> directory and resources so a
    reboot is often neccessary before Windows will allow us to delete the
    <projectName> directory and contents.

    Before doing that though I got into the habit of first rebuilding and then
    tryhing to View in Browser before trying to delete any cache noting I
    haven't been compelled to do so after rebuilding a new disk that never had
    Beta 2 installed. As they say, your performance may vary...and that's all I
    know what to say for now.

    <%= Clinton Gallagher
    NET csgallagher AT metromilwaukee.com
    URL http://clintongallagher.metromilwaukee.com/
    MAP 43°2'17"N 88°2'37"W : 43°2'17"N 88°2'37"W


    "Uriah Piddle" <> wrote in message
    news:...
    > Hi,
    >
    > I'm new with ASP.NET 2 so please bear with me. I created a website with VS
    > 2005 and enabled master pages and themes like this in WebConfig:
    >
    > <pages masterPageFile="~/Template.master" theme="DefaultTheme" />
    >
    > For several days I could edit the CSS file to format Template.master and
    > then all of a sudden, it quit and no matter what I do, the template uses
    > the settings in the CSS file as they existed two days ago. Even if I
    > delete all text in the CSS file, the settings still persist and are
    > applied to the Template. If I remove the reference to the theme, then the
    > settings are gone and the Template looses its formatting. I tried adding a
    > reference to the CSS file in the header of the Template page but that was
    > no good either.
    >
    > Please help. Thanks.
    >
    > Steve
    >
    >
    >
    >
    >
    >
    >
     
    clintonG, Aug 31, 2006
    #2
    1. Advertising

  3. Look in the theme directory and see if you have an OLD CSS file there. When
    you are using theming, the CSS comes from the theme folder. if you think it
    through, it makes perfect sense, as each theme will have a separate CSS
    file. If you are linking to a CSS outside of the theme, or have edited a CSS
    for another theme, you will not see the changes.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    *************************************************
    Think outside of the box!
    *************************************************
    "Uriah Piddle" <> wrote in message
    news:...
    > Hi,
    >
    > I'm new with ASP.NET 2 so please bear with me. I created a website with VS
    > 2005 and enabled master pages and themes like this in WebConfig:
    >
    > <pages masterPageFile="~/Template.master" theme="DefaultTheme" />
    >
    > For several days I could edit the CSS file to format Template.master and
    > then all of a sudden, it quit and no matter what I do, the template uses
    > the settings in the CSS file as they existed two days ago. Even if I
    > delete all text in the CSS file, the settings still persist and are
    > applied to the Template. If I remove the reference to the theme, then the
    > settings are gone and the Template looses its formatting. I tried adding a
    > reference to the CSS file in the header of the Template page but that was
    > no good either.
    >
    > Please help. Thanks.
    >
    > Steve
    >
    >
    >
    >
    >
    >
    >
     
    Cowboy \(Gregory A. Beamer\), Aug 31, 2006
    #3
  4. Uriah Piddle

    Uriah Piddle Guest

    Thanks guys. Clinton, I did a rebuild and it worked as you said. Thanks.





    "Cowboy (Gregory A. Beamer)" <> wrote in
    message news:...
    > Look in the theme directory and see if you have an OLD CSS file there.
    > When you are using theming, the CSS comes from the theme folder. if you
    > think it through, it makes perfect sense, as each theme will have a
    > separate CSS file. If you are linking to a CSS outside of the theme, or
    > have edited a CSS for another theme, you will not see the changes.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > *************************************************
    > Think outside of the box!
    > *************************************************
    > "Uriah Piddle" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> I'm new with ASP.NET 2 so please bear with me. I created a website with
    >> VS 2005 and enabled master pages and themes like this in WebConfig:
    >>
    >> <pages masterPageFile="~/Template.master" theme="DefaultTheme" />
    >>
    >> For several days I could edit the CSS file to format Template.master and
    >> then all of a sudden, it quit and no matter what I do, the template uses
    >> the settings in the CSS file as they existed two days ago. Even if I
    >> delete all text in the CSS file, the settings still persist and are
    >> applied to the Template. If I remove the reference to the theme, then the
    >> settings are gone and the Template looses its formatting. I tried adding
    >> a reference to the CSS file in the header of the Template page but that
    >> was no good either.
    >>
    >> Please help. Thanks.
    >>
    >> Steve
    >>
    >>
    >>
    >>
    >>
    >>
    >>

    >
    >
     
    Uriah Piddle, Aug 31, 2006
    #4
  5. Uriah Piddle

    clintonG Guest

    Good news...

    <%= Clinton


    "Uriah Piddle" <> wrote in message
    news:...
    > Thanks guys. Clinton, I did a rebuild and it worked as you said. Thanks.
    >
    >
    >
    >
    >
    > "Cowboy (Gregory A. Beamer)" <> wrote in
    > message news:...
    >> Look in the theme directory and see if you have an OLD CSS file there.
    >> When you are using theming, the CSS comes from the theme folder. if you
    >> think it through, it makes perfect sense, as each theme will have a
    >> separate CSS file. If you are linking to a CSS outside of the theme, or
    >> have edited a CSS for another theme, you will not see the changes.
    >>
    >> --
    >> Gregory A. Beamer
    >> MVP; MCP: +I, SE, SD, DBA
    >>
    >> *************************************************
    >> Think outside of the box!
    >> *************************************************
    >> "Uriah Piddle" <> wrote in message
    >> news:...
    >>> Hi,
    >>>
    >>> I'm new with ASP.NET 2 so please bear with me. I created a website with
    >>> VS 2005 and enabled master pages and themes like this in WebConfig:
    >>>
    >>> <pages masterPageFile="~/Template.master" theme="DefaultTheme" />
    >>>
    >>> For several days I could edit the CSS file to format Template.master and
    >>> then all of a sudden, it quit and no matter what I do, the template uses
    >>> the settings in the CSS file as they existed two days ago. Even if I
    >>> delete all text in the CSS file, the settings still persist and are
    >>> applied to the Template. If I remove the reference to the theme, then
    >>> the settings are gone and the Template looses its formatting. I tried
    >>> adding a reference to the CSS file in the header of the Template page
    >>> but that was no good either.
    >>>
    >>> Please help. Thanks.
    >>>
    >>> Steve
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    clintonG, Aug 31, 2006
    #5
  6. Uriah Piddle

    Uriah Piddle Guest

    I declared victory too soon. The Rebuild All thing fixed it for one try but,
    after that, the website would still not reflect the changes I had made in
    the CSS file. A guy in the Wrox forum fixed it for me: you hit the Refresh
    button your browser. The browser (IE) is running off the cached files in the
    Temporary Internet Files folder which do not reflect the chages unless they
    are refreshed.






    "clintonG" <> wrote in message
    news:...
    > Good news...
    >
    > <%= Clinton
    >
    >
    > "Uriah Piddle" <> wrote in message
    > news:...
    >> Thanks guys. Clinton, I did a rebuild and it worked as you said. Thanks.
    >>
    >>
    >>
    >>
    >>
    >> "Cowboy (Gregory A. Beamer)" <> wrote in
    >> message news:...
    >>> Look in the theme directory and see if you have an OLD CSS file there.
    >>> When you are using theming, the CSS comes from the theme folder. if you
    >>> think it through, it makes perfect sense, as each theme will have a
    >>> separate CSS file. If you are linking to a CSS outside of the theme, or
    >>> have edited a CSS for another theme, you will not see the changes.
    >>>
    >>> --
    >>> Gregory A. Beamer
    >>> MVP; MCP: +I, SE, SD, DBA
    >>>
    >>> *************************************************
    >>> Think outside of the box!
    >>> *************************************************
    >>> "Uriah Piddle" <> wrote in message
    >>> news:...
    >>>> Hi,
    >>>>
    >>>> I'm new with ASP.NET 2 so please bear with me. I created a website with
    >>>> VS 2005 and enabled master pages and themes like this in WebConfig:
    >>>>
    >>>> <pages masterPageFile="~/Template.master" theme="DefaultTheme" />
    >>>>
    >>>> For several days I could edit the CSS file to format Template.master
    >>>> and then all of a sudden, it quit and no matter what I do, the template
    >>>> uses the settings in the CSS file as they existed two days ago. Even if
    >>>> I delete all text in the CSS file, the settings still persist and are
    >>>> applied to the Template. If I remove the reference to the theme, then
    >>>> the settings are gone and the Template looses its formatting. I tried
    >>>> adding a reference to the CSS file in the header of the Template page
    >>>> but that was no good either.
    >>>>
    >>>> Please help. Thanks.
    >>>>
    >>>> Steve
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Uriah Piddle, Sep 4, 2006
    #6
    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. Kevin Vaughn

    Date Woes

    Kevin Vaughn, Jul 3, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    628
    David Waz
    Jul 3, 2003
  2. Stephajn Craig

    Regular Expression Woes

    Stephajn Craig, Jul 17, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    414
    Chris R. Timmons
    Jul 18, 2003
  3. beachnut

    Worker Process Timeout Woes

    beachnut, Aug 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,514
    beachnut
    Aug 10, 2003
  4. bjg

    More CSS woes

    bjg, Dec 10, 2003, in forum: HTML
    Replies:
    9
    Views:
    487
    kchayka
    Dec 11, 2003
  5. somebody

    More CSS woes :(

    somebody, Jan 11, 2004, in forum: HTML
    Replies:
    6
    Views:
    449
    kathy painter
    Jan 11, 2004
Loading...

Share This Page