Abhishek Luv

Online Trainer for ASP.NET MVC, Angular, ASP.NET Core, Entity Framework & EF Core

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

Note: One-on-One Online Training on C# & ASP.NET MVC 5 for fresher students and working professionals. Benefits: Personal attention, Practical Explanation & Demos.

Note: One-on-One Online Training on C# & ASP.NET MVC 5 for fresher students and working professionals. Benefits: Personal attention, Practical Explanation & Demos.

Comments