Form tag helper
The Form Tag Helper is an ASP.NET Core Tag Helper that processes Razor form elements and generates form-related HTML attributes and antiforgery content.
ASP.NET Core in Action, 3e
The Form Tag Helper is an ASP.NET Core Tag Helper that generates and configures HTML form elements from Razor attributes and routing data.
- How it is used
- Generates Razor form submission URLs and adds antiforgery fields to forms.
- How deep it goes
- Explains generated actions, route values, POST defaults, and token validation without implementing routing or token generation.
- Examples
- Shows a checkout form posting to /Checkout and a Product form inserting an id into /Product/5.
- What you can do after
- Apply it via Razor asp-page and asp-route-* attributes to configure POST destinations and route values.
Read how ASP.NET Core in Action, 3e explains form tag helper →
Pro ASP.NET Core 7, Tenth Edition
FormTagHelper is an ASP.NET Core tag helper that processes form elements in Razor markup and generates form-related attributes and antiforgery content.
- How it is used
- Generates routed form targets and adds anti-CSRF content while processing Razor form elements.
- How deep it goes
- Explains attribute configuration, rendered URLs, POST defaults, and anti-CSRF behavior without detailing helper internals.
- Examples
- Uses controller and Razor Page forms, rendered action URLs, submitted form data, and the _RequestVerificationToken field.
- What you can do after
- Apply it via Razor tag-helper attributes to build forms that follow routing changes and include anti-CSRF protection.
Read how Pro ASP.NET Core 7, Tenth Edition explains form tag helper →
Related concepts
- Tag Helperskind of · Tag Helpers are ASP.NET Core components that process HTML-like elements during Razor view or page rendering.
- routinguses · Routing is the selection of a path, destination, or processing component to direct an item, request, or flow toward an intended endpoint.
- web formuses · A web form is a browser interface that groups controls for collecting structured user input and submitting it to an application or server.
- CSRF tokenproduces · A CSRF token is an unpredictable server-issued value required on state-changing requests to verify that they originated from the intended application.
- cross-site request forgery protectionuses · Cross-site request forgery protection is a web-security technique that prevents unauthorized requests made on behalf of an authenticated user.
- url generationuses · URL generation is the programmatic construction of resource or endpoint URLs from routing metadata and parameter values.
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.

