M
Michael Lang
Any suggestions on how you can load an arbitrary number of unknown
attributes on an element in a custom section in the .config into a
NameValueCollection ?
Basically I want to do something similiar to what occurs with a
System.Configuration.Provider.ProviderBase Initialise method - the provider
is passed a NameValueCollection containing attribute names and their
associated values from the .config. see...
http://msdn2.microsoft.com/en-us/library/system.configuration.provider.providerbase.initialize.aspx
All the examples I've seen with the .NET 2.0 config api deal with scenarios
where the attributes are predefined and loaded using static code.
One brute force solution that comes to mind is just to by-pass the
Configuration api and use XML/DOM to parse the web config . But if there's
a more elegant solution that leverages the .NET Config API I'd like to use
it.
Thanks in advance
Michael
attributes on an element in a custom section in the .config into a
NameValueCollection ?
Basically I want to do something similiar to what occurs with a
System.Configuration.Provider.ProviderBase Initialise method - the provider
is passed a NameValueCollection containing attribute names and their
associated values from the .config. see...
http://msdn2.microsoft.com/en-us/library/system.configuration.provider.providerbase.initialize.aspx
All the examples I've seen with the .NET 2.0 config api deal with scenarios
where the attributes are predefined and loaded using static code.
One brute force solution that comes to mind is just to by-pass the
Configuration api and use XML/DOM to parse the web config . But if there's
a more elegant solution that leverages the .NET Config API I'd like to use
it.
Thanks in advance
Michael