Lets say I have:
NameValueCollection nvc = new NameValueCollection():
nvc.Add("Saying","Apples");
nvc.Add("Saying","Peaches");
nvc.Add("Saying","Pumpkin Pie");
now I want to change the value of 'Pumpkin Pie' to 'Cherry Pie' for the key
'Saying'
Is there a way to access the third value of the key and change it?
Bernie.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Oq**************@TK2MSFTNGP10.phx.gbl...
Bernie,
You should just be able to do this:
// pobjNameValueCollection is the NameValueCollection instance.
pobjNameValueCollection["key"] = "new value";
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Bernie Walker" <bw*****@buffalo.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl... Can an individual value be changed or must the entire collection for a
specific key be cleared and re added?
Bernie.