private static IEnumerable<KeyValuePair<string, string>> AsKeyValuePairs(this NameValueCollection collection) { return collection.AllKeys.Select(key => new KeyValuePair<string, string>(key, collection.Get(key))); }