Adds values to a NameValueCollection from another NameValueCollection.

Namespace:  EPiServer
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
public static void AddValuesToCollection(
	NameValueCollection addTo,
	NameValueCollection addFrom,
	List<string> includeKeys,
	List<string> excludeKeys
)

Parameters

addTo
Type: System.Collections.Specialized..::.NameValueCollection
The collection where the values will be added
addFrom
Type: System.Collections.Specialized..::.NameValueCollection
The collection that contains the values that will be added
includeKeys
Type: System.Collections.Generic..::.List<(Of <(String>)>)
List with the only keys that should be added. null = all keys in the addTo collection will be added
excludeKeys
Type: System.Collections.Generic..::.List<(Of <(String>)>)
List with the keys that not should be added. null = all keys in the addTo collection includeKeys will be added

Remarks

If includeKeys is null and lstDoNotAddKeys is null, all keys will be added If excludeKeys has keys and lstDoNotAddKeys has keys, all keys in includeKeys that is not contained in excludeKeys will be added

See Also