configsection

Get value from web.config applicationSettings into ASP.NET markup

这一生的挚爱 提交于 2019-11-30 19:25:40
I might be completely off track by now, so I will just ask this here so someone can help me. What I want to do, is to insert a value from my web.config, stored in an applicationSettings area, into my aspx markup. Specifically I want to reade a URL from config. This is the configSection setup I use <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=123456"> <section name="MyApp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture

Get value from web.config applicationSettings into ASP.NET markup

喜欢而已 提交于 2019-11-30 04:05:16
问题 I might be completely off track by now, so I will just ask this here so someone can help me. What I want to do, is to insert a value from my web.config, stored in an applicationSettings area, into my aspx markup. Specifically I want to reade a URL from config. This is the configSection setup I use <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=123456"> <section name="MyApp

Custom app.config Config Section Handler

纵饮孤独 提交于 2019-11-27 00:06:18
What is the correct way to pick up the list of "pages" via a class that inherits from System.Configuration.Section if I used a app.config like this? <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="XrbSettings" type="Xrb.UI.XrbSettings,Xrb.UI" /> </configSections> <XrbSettings> <pages> <add title="Google" url="http://www.google.com" /> <add title="Yahoo" url="http://www.yahoo.com" /> </pages> </XrbSettings> </configuration> Luke Quinane First you add a property in the class that extends Section: [ConfigurationProperty("pages", IsDefaultCollection = false)