在调试ASP.NET MVC应用程序期间未更新CSS [英] CSS not updated during debugging ASP.NET MVC application

查看:80
本文介绍了在调试ASP.NET MVC应用程序期间未更新CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究基于ASP.NET MVC的测试应用程序.我是CSS知识的新手,所以我也在学习.

I am working on a test application based on ASP.NET MVC. I am new to CSS stuff so I am learning that as well.

我创建了一个名为"new.master"的母版页,并创建了一个新的CSS"new.css".我将控制器的视图称为:

I have created a master page called "new.master" and created a new css "new.css". I am calling the view from controller as:

return View ("About", "new");

我正在做的是经常更新css和母版页.因此,我经常在调试模式下运行该应用程序.一段时间后,我不再看到CSS更改的效果.当我在Chrome浏览器中查看源代码"并检查CSS时,它显示的是旧版本.

What I am doing is that I am frequently updating the css and master page. So I run the application in debug mode frequently. After sometime I stop seeing the effect of changes in css. When I "view source" in chrome and check the css, it shows an old version.

当我同时更改母版页和CSS的名称时,我开始接收更新的视图,但是它在一段时间内有效,然后再次停止获取CSS更新.你遇到这个问题了吗?我该如何解决? (太烦人了!)

When I change the name of both master page and css, I start to receive updated views but that works for sometime and then again I stop getting the CSS updates. Have you faced this problem? How can I fix it? (Its terribly annoying!)

推荐答案

您的浏览器正在缓存CSS.如果您用F5强制刷新应显示任何更改.

Your browser is caching the css. If you force a refresh with F5 that should display any changes.

这篇关于在调试ASP.NET MVC应用程序期间未更新CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆