I would like to store a collection of strings in the web.config. This collection would vary in size over time. I would like to be able to pull all of the strings in the collection into an array or collection in code. (.Net 4, asp.net) i.e.
<customCodes>
<VendorCode vendorName="Name1" code="1234567891234567891324567987ddd" isActive="true"/>
<VendorCode vendorName="Name2" code="1sadfsadf1234567891324567987ddd" isActive="true" />
<VendorCode vendorName="Name3" code="123456789dfadfdsaf3324567987d32" isActive="true"/>
</customCodes>
I could use appsettings with the strings all in one value but I would like to seperate it out for organizational reasons.
Any code snippets or examples would be appreciated.
Sorry this was posted without the code example the first time. Not using the key/value pair complicates things a bit. I am now getting a message that states "you can't have duplicate elements in a section"
TIA J