title: object reference not set to an instance of an object. MVC
body: <p>I don't know why it's <code>null</code> but I pass a value in the controller but it's not passing it to the view</p>
  
  <p><strong>View:</strong></p>
  
  <pre><code>@model LABEX7_GUINTUJOSHUA.Models.DataModel1
  @{
     ViewBag.Title = "HomePage";
     Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  &lt;h2&gt;@Model.name&lt;/h2&gt;
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>using System.Web.Mvc;
  using LABEX7_GUINTUJOSHUA.Models;
  
  namespace LABEX7_GUINTUJOSHUA.Controllers
  {
      public class DataModel1Controller : Controller
      {
          // GET: DataModel1
          public ActionResult Index()
          {
              DataModel1 user = new DataModel1()
              {
                  name = "Joshua Guintu"
              };
  
  
              return View(user);
          }
          public ActionResult HomePage()
          {
  
  
              return View();
          }
      }
  
  }
  </code></pre>
  
  <p><strong>Model:</strong></p>
  
  <pre><code>namespace LABEX7_GUINTUJOSHUA.Models
  {
      public class DataModel1
      {
          public String name { get; set; }
      }
  </code></pre>
  
  <p>Please check the error in this link
  <a href="https://i.stack.imgur.com/ZxpdB.png" rel="nofollow noreferrer">ERORR PIC</a></p>