View Source
Inheritance
System.Object
Assembly: Umbraco.Web.dll
public static class FormDataCollectionExtensions
Methods
View Source
Returns the value of a mandatory item in the FormCollection
Declaration
public static string GetRequiredString(this FormDataCollection items, string key)
Parameters
Type |
Name |
Description |
FormDataCollection |
items |
|
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
View Source
Returns the object based in the collection based on it's key. This does this with a conversion so if it doesn't convert or the query string is no there an exception is thrown
Declaration
public static T GetRequiredValue<T>(this FormDataCollection items, string key)
Parameters
Type |
Name |
Description |
FormDataCollection |
items |
|
System.String |
key |
|
Returns
Type Parameters
View Source
Returns the object based in the collection based on it's key. This does this with a conversion so if it doesn't convert a null object is returned.
Declaration
public static T GetValue<T>(this FormDataCollection items, string key)
Parameters
Type |
Name |
Description |
FormDataCollection |
items |
|
System.String |
key |
|
Returns
Type Parameters
View Source
Checks if the collection contains the key
Declaration
public static bool HasKey(this FormDataCollection items, string key)
Parameters
Type |
Name |
Description |
FormDataCollection |
items |
|
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Converts the FormCollection to a dictionary
Declaration
public static IDictionary<string, object> ToDictionary(this FormDataCollection items)
Parameters
Type |
Name |
Description |
FormDataCollection |
items |
|
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
View Source
Declaration
public static string ToQueryString(this FormDataCollection items, params string[] keysToIgnore)
Parameters
Type |
Name |
Description |
FormDataCollection |
items |
|
System.String[] |
keysToIgnore |
|
Returns
Type |
Description |
System.String |
|