Unosquare
    Show / Hide Table of Contents

    Class FormDataAttribute

    Specifies that a parameter of a controller method will receive a of HTML form data, obtained by deserializing a request body with a content type of application/x-www-form-urlencoded.

    The received collection will be read-only.

    This class cannot be inherited.

    Inheritance
    Object
    FormDataAttribute
    Implements
    INonNullRequestDataAttribute<WebApiController, NameValueCollection>
    Namespace: EmbedIO.WebApi
    Syntax
    public sealed class FormDataAttribute : Attribute, INonNullRequestDataAttribute<WebApiController, NameValueCollection>

    Methods

    GetRequestDataAsync(WebApiController, String)

    Asynchronously obtains data from a controller's context.

    Declaration
    public Task<NameValueCollection> GetRequestDataAsync(WebApiController controller, string parameterName)
    Parameters
    Type Name Description
    WebApiController controller
    String parameterName

    The name of the parameter that has to receive the data.

    Returns
    Type Description
    Task<NameValueCollection>

    a whose result will be the data to pass as a parameter to a controller method.

    Implements

    INonNullRequestDataAttribute<TController, TData>

    See Also

    INonNullRequestDataAttribute<TController, TData>

    Comments

    Back to top Copyright © 2017-2019 Unosquare