title: How do I display a Value from an input field in a Bootstrap Modal?
body: <p>I am trying to create a Modal Confirmation dialog that displays the text entered into a text box for them to review before submitting.</p>
  
  <p>I have it all 'working' except for displaying the Text in the Modal. Below is my View. Notice the <code>@Model.UserName</code> field.  That shows nothing even though, if I click Submit on that page, it has a value once it get's back to the Controller.  </p>
  
  <p>So, how do I display the value of that Property or the Text box that contains it?</p>
  
  <pre><code>@model HelpDeskSupportRequestor.Models.SupportRequest
  
  &lt;h2&gt;IT Support Request&lt;/h2&gt;    
  
  @using (Html.BeginForm()) 
  {
      @Html.AntiForgeryToken()
  
  &lt;div class="form-horizontal"&gt;
      &lt;hr /&gt;
      @Html.ValidationSummary(true, "", new { @class = "text-danger" })
      &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.UserName, htmlAttributes: new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.EditorFor(model =&gt; model.UserName, new { htmlAttributes = new { @class = "form-control" } })
              @Html.ValidationMessageFor(model =&gt; model.UserName, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.EmailAddress, htmlAttributes: new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.EditorFor(model =&gt; model.EmailAddress, new { htmlAttributes = new { @class = "form-control" } })
              @Html.ValidationMessageFor(model =&gt; model.EmailAddress, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.RequestDetails, htmlAttributes: new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.EditorFor(model =&gt; model.RequestDetails, new { htmlAttributes = new { @class = "form-control" } })
              @Html.ValidationMessageFor(model =&gt; model.RequestDetails, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.RequestPriority, htmlAttributes: new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.EditorFor(model =&gt; model.RequestPriority)
              @Html.ValidationMessageFor(model =&gt; model.RequestPriority, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
          &lt;div class="col-md-offset-2 col-md-10"&gt;
              &lt;input type="button" data-toggle="modal" data-target="#myModal" value="Submit Request" class="btn btn-default" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="modal" id="myModal"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;Confirm IT Support Request&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;p&gt;@Model.UserName&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;input type="button" class="btn btn-default" data-dismiss="modal" value="Cancel" /&gt;
                  &lt;input type="submit" class="btn btn-primary" value="Confirm" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  }
  </code></pre>