>> In my windows apps I always set a global development variable so that I
>> can
[quoted text clipped - 19 lines]
> ...
> </system.web>
OK, but that's actually not what you asked for... You asked for a method to
use a variable to toggle *blocks of code*, and even gave an example of it,
which is why I gave you the Google link for articles on how to do
conditional compilation in ASP.NET...
If you are now saying that you want to be able to use, essentially,
different web.configs for development / production etc, then you need this:
http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project
-support-released.aspx

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net