Questions tagged [namevaluecollection]

NameValueCollection is a .Net collection of string keys and string values that can be accessed either with by key or by the index.

NameValueCollection is a .Net collection of string keys and string values that can be accessed either with by key or by the index.

References

116 questions
0
votes
1 answer

How can I populate a NameValueCollection via a parameter in a shared method?

I have a code segment: var requestMock = new Mock(); var queryString = new NameValueCollection(); queryString["abc"] = "123"; queryString["qwe"] = "456"; queryString["yui"] = "678"; ... requestMock.SetupGet(rqst =>…
GilliVilla
  • 4,998
  • 11
  • 55
  • 96
0
votes
1 answer

Fastest way to do name value pair look up for a long list

I'm working with a long list of name - value pairs and I will be checking with this list alot so I wanted to know what you guys think is the fastest way to do named value pair look ups. An example of my problem is as follows: Using PHP The variables…
GivenPie
  • 1,451
  • 9
  • 36
  • 57
0
votes
2 answers

how can i get HttpContext.Current.Request of more than 1000 html controls value?

I have more than 1000 controls in a html web page. when i submit the page i get only values of 1000 controls NameValueCollection nv = (NameValueCollection) HttpContext.Current.Request.Form nv.count is 1000 , how can i get…
Mask
  • 647
  • 2
  • 9
  • 21
0
votes
0 answers

Linq to Entities with NameValueCollection

What is the best way to deal with the problem that you can't use a NameValueCollection or Dictionary in a LINQ to Entities query? I know you can assign the value to a temporary string variable and then use that in your query...but is there any other…
PaulK
  • 623
  • 2
  • 10
  • 22
0
votes
2 answers

F# NameValueCollection to Map

I have a NameValueCollection which I need to convert to a Map and I just can't work it out. I tried: let headerMap (m : MailMessage) = m.Headers |> Map.map (fun k v -> v.[k]) Do I need to use Seq.map instead? Basically the point of this is that I…
shmish111
  • 3,697
  • 5
  • 30
  • 52
0
votes
1 answer

Get POST Values in ASP.NET using NameValueCollection

So I have 2 pages. They both have the same master page and are part of the same Web Application. I am trying to submit one page to the other. On the submitting page I have a few elements such as
Steve
  • 652
  • 3
  • 11
  • 23
0
votes
2 answers

c# how to request url parameters and change char

After getting some url parameters, I would like to use them later in my c# code, but in a slightly different format. "http://example/myexample.aspx?attendees=john.sam&speakers=fred.will.tony.amy.al" I am able to get the values as a string in their…
-1
votes
2 answers

How can I convert from JsonString to NameValueCollection

I have a JSON string like below: "\"{\\\"PersonNumber\\\":\\\"4537\\\",\\\"PersonName\\\":\\\"Jenny\\\"}\"" I want to convert this JSON to NameValueCollection and I have tried below codes. but I am getting an error : string jsonString=…
-1
votes
1 answer

Reading key value pair from hash table

I am storing below in my web config. Now i am loading this into hast table NameValueCollection tempCollection = (NameValueCollection)ConfigurationManager.GetSection(CONFIG_SECTION); Hashtable…
user1104946
  • 680
  • 1
  • 9
  • 30
-3
votes
2 answers

Why "foreach" loop returns Key while "indexer" returns Value from a NameValueCollection

I have a NameValueCollection which contain several items. When I try to retrieve a value from that collection, it returns me the Key from the collection NameValueCollection col= new NameValueCollection(); col.Add("Item1", "Foo"); …
sohaiby
  • 1,168
  • 3
  • 24
  • 39
-3
votes
1 answer

IEnumerable items to be added to NameValueCollection

I have a class: public class CustomerItem { public CustomerItem(IEnumerable someProperties, IEnumerable grades, decimal unitPrice, int quantity, string productCode) …
GilliVilla
  • 4,998
  • 11
  • 55
  • 96
1 2 3 4 5 6 7
8