why use <configSections> instead of <appSettings>?
hi guys, have some questions here:
- in chap3, we saw that the reason not using <appSettings> is to avoid the conflict of having same name on two different settings. is that the only reason?
- i found that many settings were hard-coded in configSection.cs. (for example, [ConfigurationProperty("mailSubject", DefaultValue="Mail from TheBeerHouse: {0}")]). why not leave it at web.config? actually, why not leave all the settings at web.config? after all, i thought that's why we need web.config. in this sample site, some settings are at configSection.cs and some at web.config, how do i decide what goes to what?
- at configSection.cs, we have this:
public string DefaultConnectionStringName
{
get { return (string)base["defaultConnectionStringName"]; }
set { base["connectionStdefaultConnectionStringNameringNa me"] = value; }
}
i don't know how to come to the setter. what is this: connectionStdefaultConnectionStringNameringName?
hope i can get some answers. thanks!
|