Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

How do I enter a conditional compilation statements into ASP.NET code-behind?

$
0
0

I'm doing some maintenance on a ASP.NET Web Forms app that was written some years ago by someone else. In the solution there's one ASP.NET project, and the others are all class library (DLL) projects. I want to put in#If  DEBUG directive into some of the code. It works fine in the class library projects, but I've just discovered that it doesn't work in the ASP.NET project. When I try to enter a#If DEBUG directive Visual Studio doesn't recognize it in the code-behind file I'm working on. And I can't find a Project | Properties for the ASP.NET project, which is where I'd go to enter the DEBUG constant, if I knew where to find it.

So how do I enter a conditional compilation into the VB.NET code behind?

The project was written using the .NET Framework 2, so it was quite a while ago that he wrote this.


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>