The last chapter covered how model binding takes form input and binds it to handler parameters and public properties in Razor Pages. You learned that the key to ensuring successful binding is ensuring that the name of the binding source matches that of the binding target. Up to now, you have generated the name of your form controls manually. This potentially error-prone approach doesn’t move you much beyond fishing around in the Request.Form collection for your posted values.
In Razor Pages applications, forms are where tag helpers shine. You have already seen their role in client- and server-side validation with the validation tag helpers. This chapter will explore how to generate forms to collect data from users and work with the model-binding system. You will see how they can be used to ensure control names work smoothly with binding target names. The following tag helpers are available for form building: