title: Best approach to display model data in modal pop up in MVC3
body: <p>I have a table that displays information.  When the user clicks on the row, I would like to display the data in a modal pop up. Since the Model already contains my data my initial thought would be to just pass the model to a JavaScript function which would then populate my modal popup but I see that is not possible.</p>
  
  <p><strong>razr</strong>:</p>
  
  <pre><code>foreach (Insurance insurance in Model.Patient.InsuranceCollection)
  {
    &lt;tr style="border-bottom:#676767 solid 1px;"&gt;
      &lt;td class="table_highlight"&gt;&lt;span style="cursor:pointer;" onclick="EditInsurance(@insurance)"&gt;@insurance.Company&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;@insurance.IdNumber&lt;/td&gt;
      &lt;td&gt;@insurance.Group&lt;/td&gt;
      &lt;td&gt;@insurance.PlanType&lt;/td&gt;
      &lt;td&gt;@insurance.PaymentRatio&lt;/td&gt;
    &lt;/tr&gt;
  }
  </code></pre>
  
  <p>I know I can pass the id to my function if I do <code>EditInsurance(@insurance.Id)</code> and could do an ajax call to the server to pull the data from the database but this seems bad since I already have the data in the model, I just can't seem to figure out the best way to access this model data to display in my pop-up when the user clicks on the row.</p>
  
  <p>Thanks for your help.</p>