Class UrlEncodingParser

A query string or UrlEncoded form parser and editor class that allows reading and writing of urlencoded key value pairs used for query string and HTTP form data.

Useful for parsing and editing querystrings inside of non-Web code that doesn't have easy access to the HttpUtility class.

System.Object
  System.Collections.Specialized.NameObjectCollectionBase
    System.Collections.Specialized.NameValueCollection
      Westwind.Utilities.UrlEncodingParser
public class UrlEncodingParser : NameValueCollection

Remarks

Supports multiple values per key

Class Members

MemberDescription

Constructor

Always pass in a UrlEncoded data or a URL to parse from unless you are creating a new one from scratch.

Parse

Parses the query string into the internal dictionary and optionally also returns this dictionary

public NameValueCollection Parse(string query)

SetValues

Assigns multiple values to the same key

public void SetValues(string key,     IEnumerable values)

ToString

Writes out the urlencoded data/query string or full URL based on the internally set values.

public virtual string ToString()

DecodePlusSignsAsSpaces

Determines whether plus signs in the UrlEncoded content are treated as spaces.

Requirements

Namespace: Westwind.Utilities
Assembly: westwind.utilities.dll

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic