FormData Class

https://xhr.spec.whatwg.org/#interface-formdata

public sealed class FormData : IEnumerable<KeyValuePair<string, FormDataEntryValue>>, IEnumerable
Implements

Constructors

NameDescription
FormData(HtmlFormElement?, HtmlElement?)https://xhr.spec.whatwg.org/#dom-formdata

FormData(HtmlFormElement?, HtmlElement?)

FormData.cs

https://xhr.spec.whatwg.org/#dom-formdata

public FormData(HtmlFormElement? form = null, HtmlElement? submitter = null)

Methods

NameDescription
Append(string, Blob, string?)Appends a new entry with the given name and blob value; a blob is converted to a file with the given file name.
Append(string, string)Appends a new entry with the given name and string value.
Delete(string)Removes all the entries with the given name.
Get(string)Returns the value of the first entry with the given name, or null when there is none.
GetAll(string)Returns the values of all the entries with the given name.
GetEnumerator()Returns an enumerator that iterates through the collection.
Has(string)Returns a value indicating whether an entry with the given name exists.
Set(string, Blob, string?)Sets the blob value of the first entry with the given name and removes the other ones, or appends a new entry.
Set(string, string)Sets the value of the first entry with the given name and removes the other ones, or appends a new entry.
System.Collections.IEnumerable.GetEnumerator()

Append overloads

Append(string, Blob, string?)

FormData.cs

Appends a new entry with the given name and blob value; a blob is converted to a file with the given file name.

public void Append(string name, Blob blobValue, string? filename = null)

Append(string, string)

FormData.cs

Appends a new entry with the given name and string value.

public void Append(string name, string value)

Delete(string)

FormData.cs

Removes all the entries with the given name.

public void Delete(string name)

Get(string)

FormData.cs

Returns the value of the first entry with the given name, or null when there is none.

public FormDataEntryValue? Get(string name)

GetAll(string)

FormData.cs

Returns the values of all the entries with the given name.

GetEnumerator()

FormData.cs

Returns an enumerator that iterates through the collection.

Returns

IEnumerator<KeyValuePair<string, FormDataEntryValue>> An enumerator that can be used to iterate through the collection.

See also

Has(string)

FormData.cs

Returns a value indicating whether an entry with the given name exists.

public bool Has(string name)

Set overloads

Set(string, Blob, string?)

FormData.cs

Sets the blob value of the first entry with the given name and removes the other ones, or appends a new entry.

public void Set(string name, Blob blobValue, string? filename = null)

Set(string, string)

FormData.cs

Sets the value of the first entry with the given name and removes the other ones, or appends a new entry.

public void Set(string name, string value)

System.Collections.IEnumerable.GetEnumerator()

FormData.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.