Accessing Form Data Into the Controller Using the Request Object in ASP.NET MVC


Accessing form data inside a controller is a very common scenario.

Note: Post updated with source code files posted on gist.github.com

Steps required to do:

  • Create a controller with Get and Post methods
  • Inside the HttpPost action method access the form data values using the Request object
  • Create a Create.cshtml View file with a form using Html.BeginForm
  • Create a breakpoint and check the form values


About author


Code with Abhishek Luv

.NET Freelance Consultant | Full-Stack Web Developer (ASP.NET Core, Angular, Azure) | 14+ Yrs Experience

I’m a full-stack .NET freelance consultant with 14+ years of experience building secure, scalable, and production-ready web applications using ASP.NET Core, Angular, EF Core, and Azure.

Recent Blog Posts