title: Asp.net mvc razor read passed value to modal
body: <p>I got a list a buttons, that passes indicators Id and opens bootstrap modal. I found how to pass this value, but didnt found how to get it. Here is my code:</p>
  
  <pre><code>@model Project.Models.Survey
  
  @{
      var i = 1;
  }
  
  @foreach (var Clasificator in Model.Clasificators)
  {
      &lt;h2&gt;@Clasificator.Name&lt;/h2&gt;
      &lt;br/&gt;
      foreach (var Criteria in Model.Criterias)
      {
          if (Criteria.ClasificatorId == Clasificator.Id)
          {
              &lt;h3&gt;@Criteria.Name&lt;/h3&gt;
              &lt;br/&gt;
              foreach (var Indicator in Model.Indicators)
              {
                  if (Indicator.CriteriaId == Criteria.Id)
                  {
                      &lt;h4&gt; @i @Indicator.Name &lt;/h4&gt;
                      &lt;br/&gt;
                      &lt;button id="@Indicator.Id" type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" data-indicatorId="@Indicator.Id"&gt;
                          Add New Object
                      &lt;/button&gt;    
                      i++;
                  }
              }
          }
      }
  }
  
  
  &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"&gt;
      &lt;div class="modal-dialog" role="document"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                 // Catch here indicator Id
                 If (indicatorId)
                 {}
  
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It is possible to catch it ? I need to use that value in other if.</p>