[Solved] CSS (stylesheet) changes not updating in browser

JonJacobs
 
on Apr 27, 2022 11:02 PM
710 Views

I edited the background colors in my WebApp1.css. The Web Forms show exactly what they should in Design mode, but when I build and run, the background colors remain what they were formerly. I even dumped all copies of Visual Studio (2019) and re-loaded the web app. No change. Here is the css content in full: 

<style>
    body {
        padding-top: 0px;
        padding-bottom: 90px;
        background-color: cadetblue;
    }

        body.main {
            padding-top: 0px;
            padding-bottom: 90px;
            background-color: cyan;
        }

        body.copath {
            padding-top: 0px;
            padding-bottom: 90px;
            background-color: lightgreen;
        }

    h1 {
        font-family: Arial;
        margin: -6px;
    }

        h1.main {
            padding-top: 0px;
            padding-left: 10px;
            margin: -10px;
        }

    ul.nav {
        padding-top: 0px;
        padding-left: 0px;
        margin: -5px;
        text-align: left;
    }

        ul.nav > li {
            display: inline-block;
            padding: 10px 10px;
            height: 10px;
        }

            ul.nav > li:hover {
                background-color: cornflowerblue;
            }

            ul.nav > li > a {
                color: mediumblue;
                text-decoration: none;
            }
</style>

Here are the relevant pieces of Source:

In Main.aspx

<body class="main">

in DEP.aspx

<body>

in Copath.aspx

<body class="copath">

InOneADay.aspx

<body>

In every case, when I switch from Source to Design view, I see the proper background color. When I run the application (from VS), Every Web Form shows the original background color from weeks ago (bisque).

What is going on?

Download FREE API for Word, Excel and PDF in ASP.Net: Download
arjunv
 
on Apr 28, 2022 06:11 AM

Press ctrl + F5 in the browser to update the changes.