Monday, 26 August 2013

Dynamically Compiled ASP.NET Website

Dynamically Compiled ASP.NET Website

I want to dynamically compile an ASP.NET Web Site (NOT project that has
.csproj) depending on the configuration/symbols that I've setup. So under
the configuration manager, I have the following:
DEVELOPMENT
STAGING
PRODUCTION
and in Default.aspx.cs I have:
#if PRODUCTION
lblMessage.Text = "PRODUCTION";
#elif STAGING
lblMessage.Text = "STAGING";
#elif DEVELOPMENT
lblMessage.Text = "DEVELOPMENT";

No comments:

Post a Comment