create your own settings in xml

后端 未结 3 1603
渐次进展
渐次进展 2020-12-06 08:20

I\'m in a ASP.NET project where I need to give several parameters to the administrator that is going to install the website, like:

AllowUserToChangePanelLayo         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-06 09:05

    You may also put your configurations in a settings file. In your project, open Properties and go to Settings which looks like so

    To access the values in your code, use Properties.Settings.YourSettingName;

    Use Properties.Settings.Default.Reload(); to refresh your settings during runtime

提交回复
热议问题