Use:
HttpContext.Current.IsDebuggingEnabled
This property actually looks at the web.config configuration setting. If you look at it using Reflector you will find that it gets the actual ConfigurationSection object using some internal classes.
Use:
HttpContext.Current.IsDebuggingEnabled
This property actually looks at the web.config configuration setting. If you look at it using Reflector you will find that it gets the actual ConfigurationSection object using some internal classes.