#DEBUG Preprocessor statements in ASPX page

前端 未结 8 1106
滥情空心
滥情空心 2020-12-29 22:09

I\'m trying to use a preprocessor directive in an ASPX page, but the page doesn\'t recognize it. Is this just something I can\'t do?

Background: I\'m trying to inclu

8条回答
  •  忘掉有多难
    2020-12-29 22:50

    Interesting difference here - using #if DEBUG in the aspx page pulls from the tag in the web.config, but when you use it in the code-behind, it pulls DEBUG from the constant from the build configuration in the project file. So they're actually accessing two different settings.

    Thus, as far as I can tell, this isn't actually possible.

提交回复
热议问题