FormData Class
https://xhr.spec.whatwg.org/#interface-formdata
public sealed class FormData : IEnumerable<KeyValuePair<string, FormDataEntryValue>>, IEnumerableConstructors
| Name | Description |
|---|---|
| FormData(HtmlFormElement?, HtmlElement?) | https://xhr.spec.whatwg.org/#dom-formdata |
FormData(HtmlFormElement?, HtmlElement?)
FormData.cshttps://xhr.spec.whatwg.org/#dom-formdata
public FormData(HtmlFormElement? form = null, HtmlElement? submitter = null)Methods
| Name | Description |
|---|---|
| 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() |
Delete(string)
FormData.csRemoves all the entries with the given name.
Get(string)
FormData.csReturns the value of the first entry with the given name, or null when there is none.
public FormDataEntryValue? Get(string name)GetAll(string)
FormData.csReturns the values of all the entries with the given name.
public IReadOnlyList<FormDataEntryValue> GetAll(string name)GetEnumerator()
FormData.csReturns an enumerator that iterates through the collection.
public IEnumerator<KeyValuePair<string, FormDataEntryValue>> GetEnumerator()Returns
IEnumerator<KeyValuePair<string, FormDataEntryValue>> An enumerator that can be used to iterate through the collection.
See also
Has(string)
FormData.csReturns a value indicating whether an entry with the given name exists.