title: Parameterized delete confirmation Modal .NET Core 2.1
body: <p>I'm little bit new in web development. I have an application with many Index sites which display list with elements. These elements are deletable with a HtmlAction. I want to make a generic? modal which appear when the user has clicked the button. This modal request a confirmation from user to delete the selected element from list. If I'm right I have to pass some data to this modal e.g. (which controller, which action, which elementId). Somehow can I create a parameterized modal? Can you give me some startpoint for this? </p>
  
  <pre><code>&lt;div class="row "&gt;
      &lt;div class="card"&gt;
          &lt;table class="table"&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;h5&gt;@Html.DisplayNameFor(item =&gt; item.SupplyTypeName)&lt;/h5&gt;
                  &lt;/td&gt;
                  &lt;td&gt;&lt;/td&gt;
              &lt;/tr&gt;
              @foreach (var item in Model)
              {
                  &lt;tr&gt;
                      &lt;td&gt;
                          @Html.DisplayFor(modelItem =&gt; item.SupplyTypeName)
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;i class='material-icons'&gt;
                              @Html.ActionLink("mode_edit", "Edit", new { id = item.Id })
                          &lt;/i&gt;
                          &lt;i class='material-icons' data-toggle="modal" data-target="#myModal"&gt;
                              *
                          &lt;/i&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              }
  
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&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;&amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="myModalLabel"&gt;Delete Confirmation&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  Are you sure want to delete this item?
              &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;button type="button" class="btn btn-danger"&gt;Delete&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>