title: Passing data from a View to a Controller in .NET MVC - "@model" not highlighting
body: <p>The following code works as I need it to:</p>
  
  <pre><code> @using (Html.BeginForm("LOLOL", "PATIENT", null))
      {
          @Html.ValidationSummary(true)
          &lt;fieldset&gt;
              &lt;legend&gt;PATIENT&lt;/legend&gt;
              &lt;div class="editor-label"&gt;
                  @Html.LabelFor(model =&gt; model.Name)
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                  @Html.EditorFor(model =&gt; model.Name)
                  @Html.ValidationMessageFor(model =&gt; model.Name)
              &lt;/div&gt;
  
          &lt;/fieldset&gt;
          &lt;p&gt;
              &lt;input type="submit" value="SUBMIT" /&gt;
          &lt;/p&gt;
      }  
  </code></pre>
  
  <p>In LOLOLController:</p>
  
  <pre><code>[HttpPost]
      public IActionResult LOLOL(Patient p) {
          var client = new MongoClient("mongodb://localhost:27017");
          var userId = _userManager.GetUserId(HttpContext.User);
          string db_name = "test" + userId;
          var database = client.GetDatabase(db_name);
          var collection = database.GetCollection&lt;BsonDocument&gt;("patients");
          var filter = Builders&lt;BsonDocument&gt;.Filter.Eq("Name", p.Name.ToString());
          var document = collection.Find(filter).First();
          // I'm cutting short the rest of the code, because when I do something 
   // similar later, "collection.Find(filter).First()" fires an exception, I'll     
  // explain..
  
  
          return View(p);
      }
  </code></pre>
  
  <p>I have something equivalent to taking off the fieldset element in the HTML, leaving basically just a button in the "Html.BeginForm", but then the data is clearly not binding properly, which I know because if I just have a button and no data-entry, I click the button and then I get an error saying the data cannot be found from the database.  (EDIT: I now have confirmed that this is indeed because the Patient object is not being passed to the controller quite as I expected it to, seems like a brand new Patient object was created upon calling html.beginform ... I thought that maybe the old Patient object was being passed so I did not have to enter all its data members every time we use Html.BeginForm)</p>
  
  <p><strong>In sum, I want to fill out a text box, click a button to load a new page and display the value of that textbox, but have that value also persisted in essentially a session state, so that if I call another Html.BeginForm function and go into a third view, the text from the first view will be displayed in the third view, even though I did not have to type its value in the second view.</strong>  Hopefully I can repeat this process, and essentially load up the data members of a class with one view per data member.</p>