I have a mvc program which can be run in 2 environments dev and prod. I referred to this program in https://www.codeproject.com/Articles/17660/Single-web-config-file-across-all-environments-dev and attached ConfitIt.dll to my MVC program. In Global.asax.cs and Application_Start method, I included
String environment = EnvironmentSettings.Environment;
In the Index.cshtml, I have a button whose value needs to change depending on environment I want it to display "Push to" + whatever environment it's in This is the code I have
<input type="submit" value="Push to" +EnvironmentSettings.Environment style="height:40px; width: 60px;font-weight: bold;background-color:#b6ffff; " /> <br />
I know this is wrong because I don't see the value. I tried this
@Html.Label("dynamic settings", EnvironmentSettings.Environment)
and I see the correct value
How can I do this or is there an alternate way instead of ConfigIt.dll? Thanks MR