What is used of Name Value Collection in ASP.NET?
how it is used in asp.net ?
Thanx
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sagar BhosalePosted Aug 12, 2011, 4:51 AM
Priya LingePosted Aug 12, 2011, 4:03 AM
NameValueCollection represents a collection of associated String keys and String values that can be accessed
either with the key or with the index.
A NameValueCollection is similar to a .NET Hash Table in that it can store items in key/value pairs and allows you to retrieve items
by specifying either the Key or index.
Example :
Namespace : using System.Collections.Specialized;
NameValueCollection coll = new NameValueCollection();
coll = Request.Form;
here we will get the collection of form variables in coll.
Hope this will help you.
Thanks.