I have an ASP MVC view where have the following statement
#if DEBUG //section 1 //do stuff #else //section 2 //do other stuff #endif
Set in your web.config file.
web.config