Hi,
Another question in connection with the module.config and settings.config: If I get it right, if the sitename parameter is not empty, then the function returns the settings.config from the given site. But when I try to put in some CustomSetting, eg. a DefaultUser, after having built it in the Settings.cshtml, it seems that the controller clears it out when it executes the SaveModuleSetting method. Is it possible to do it without rewriting the AdminController or writing another class?
Some more context:
At the moment I have this custom setting in the settings.config:
Code:
<a:KeyValueOfstringstring>
<a:Key>DefaultUser</a:Key>
<a:Value>Jake Plaster</a:Value>
</a:KeyValueOfstringstring>
I can query this in the View with
Code:
@Model.Settings.CustomSettings["DefaultUser"]
But when I change the value and save the settings page it comes up with the error:
The given key was not present in the dictionary.and simply deletes the custom setting from the config file.
Is there a suggestion?
Thanks.