In the Create a new project dialog, select ASP.NET Web Application (.NET Framework) > Next. define the associated view by replacing the content of the . Set values to Model in MVC The controller should look like something similar to the code below C# ViewModel in ASP.NET MVC with Examples - Dot Net Tutorials ASP.NET MVC - Passing Data From Controller To View Tantamount to web applications is the collection and processing of user input data. Add a Solution 1 solution Solution 1 Please try below mentioned simple way. Select the scaffolding template list because we are going to create a view to display information for multiple students. This will create _StudentList.cshtml as shown below. Step 1 - Create an ASP.NET MVC app. Constructor binding and record types. ViewModel in MVC | How to Create ViewModel and Controller File? - EDUCBA If you put business logic in the View via Razor then you're skirting around the reason for using MVC in the first place. public ActionResult GetBlogComment () { ViewData [ "Blog"] = GetBlogModel (); ViewData [ "Comments"] = GetCommentModel (); return View (); } Now change your view ( GetBlogComment.cshtml) according to view Data as below: Run the application and we will get the same result as in approach 1. For displaying the records, an HTML Table is used. View Variables In .NET MVC - c-sharpcorner.com passing model value to controller from View Please find the below my code snippet,