liveBook · Manning

BindProperty attribute

The BindProperty attribute is an ASP.NET Core attribute that enables binding a Razor PageModel property from incoming request data.

How 2 Manning books explain it

ASP.NET Core in Action, 3e

The BindProperty attribute marks a Razor PageModel property for binding from incoming request data.

How it is used
Populates Razor Pages PageModel properties from request data so page handlers can use submitted values.
How deep it goes
Explains binding targets, public setters, GET opt-in, and input-model organization; does not detail custom binder implementation.
Examples
Contrasts GET and POST properties, then groups edit-form fields in a nested input model.
What you can do after
Apply it in Razor Pages to bind a settable input-model property, opt into GET when needed, and validate submitted input.

Read how ASP.NET Core in Action, 3e explains BindProperty attribute →

Pro ASP.NET Core 7, Tenth Edition

The BindProperty attribute is an ASP.NET Core attribute that marks a page-model property for binding from request data.

How it is used
Populates Razor Page properties from request data so handlers can use them without duplicate parameters.
How deep it goes
Explains name matching, GET opt-in, prefixes, complex properties, and arrays through form examples; does not detail binder internals.
Examples
Uses a completed-order identifier, a product form, and repeated or indexed inputs for an array.
What you can do after
Apply it in Razor Pages to bind properties from forms or GET requests and adjust names for nested or array values.

Read how Pro ASP.NET Core 7, Tenth Edition explains BindProperty attribute →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.