我在这里为应该简单的东西画了一个空白......
我正在尝试做类似的事情:
<my:control runat="server" id="myid" Visible="<%= (is compilation debug mode?) %>" />
最佳答案
HttpContext.IsDebuggingEnabled
property :
using System.Web;
if (HttpContext.Current.IsDebuggingEnabled) { /* ... */ }
来自文档:
Gets a value indicating whether the current HTTP request is in debug mode[…]
true
if the request is in debug mode; otherwise,false
.
关于c# - web.config中如何判断是否编译调试="true",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6193010/