C# and ASP.NET MVC: Using #if directive in a view

前端 未结 7 2114
不知归路
不知归路 2020-12-03 04:05

I\'ve got a conditional compilation symbol I\'m using called \"RELEASE\", that I indicated in my project\'s properties in Visual Studio. I want some particular CSS to be app

相关标签:
7条回答
  • 2020-12-03 05:06

    I recently discovered that you can simply test:

    HttpContext.Current.IsDebuggingEnabled
    

    in Views, which saves you checking symbols in other parts of your app.

    0 讨论(0)
提交回复
热议问题