"Keith G Hicks" <kr*@comcast.netwrote in message
news:OK*************@TK2MSFTNGP06.phx.gbl...
>In my windows apps I always set a global development variable so that I
can
toggle certain blocks of code back and forth between production and
development settings. I'll run some startup code that sets something like
DevVar = TRUE or DevVar = FALSE and then do this in code where needed:
If DevVar Then
....do something
ELSE
... do something else
END IF
This is pretty much what I was looking for:
<configuration>
<!-- application specific settings -->
<appSettings>
<add key="connString" value="connection string" />
</appSettings>
<system.web>
...
</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/archi...-released.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net