Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You're close...</p> <p>The model binder considers all of the data from the request's form data, the URL query string, and routing parameters. The binder will attempt to bind to the arguments of the action method and to any public properties of the model that have both a get and set defined. This is done by considering the name of the parameter and/or public property.</p> <p>Since all of the input sources are in a name-value format, the names are matched. For example, if there is an "id" routing parameter and your action method has an "id" argument in its signature, the binder will bind the routing parameter to that action method argument. If there is a country form field and a model with a public country property, the model binder will attempt to bind the form field to the model. Etc.</p> <p>The binder considers the type of the property when binding. The default model binder knows how to bind to the scalar properties (int, decimal, DateTime, etc.). It also can bind to a list (key format MyList[0]) or to a complex type that in turn exposes child properties (e.g, key format Rectangle.Width).</p> <p>The example you have posted adds the ability to bind to a TimeZoneInfo object. That binder is being invoked because the name of a form parameter, query argument or routing parameter matches the name of a public property on your model that exposes a getter and setter that returns a TimeZoneInfo object.</p> <p>Note the ModelBinder works in concert with the ModelState dictionary. It's important that invalid user input gets preserved even if it cannot be converted to the target type. In that case, an error is added to the ModelState dictionary and the raw value of the input parameter is kept so that it can be included in a re-rendering of the form with validation errors.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload