I want to create an Application Setting or Control Value for "Application Run Mode", which will indicate if the application is in Testing Mode or Live Mode.
So I have created this Enum Type: Public Enum AppRunModeType
and, this will be used inside the the Web Application to determine if the application run mode, and hide/show some UI Controls accordingly.
This Setting "Application Run Mode" is not a User Setting, it is a setting to be controlled by the developer who is deploying the application.
Where is the best place to store this value ?
I am thinking there are 2 places:
1. In web.config "appSettings" secting,
2. Or in Project Properties Page/Settings Section.
If I choose to store it in web.config, then, I will not be able to have Strong Type Access to the value like the Enum type, and I have to convert from Enum Type to String and vise versa.
If I choose to store it in Project Properties Page/Settings Section, then I cannot do that, becuase my Web Application is not a Porject and I cannot find this page there, or I will have to convert the Web Application to a Web Application Porject, and this is a Long Story. Also, How I can access My.Settings object from the Web Application ?
Appreciate if some one could point me to the right direction and the best way to hanlde such requirement.
View Complete Post