title: Identify the index of the button clicked while generating buttons using data repeater
body: <p><a href="https://i.stack.imgur.com/m8Yry.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8Yry.png" alt="I need to identify the row of the button click.Button is added  dynamically throught a data repeater"></a>    </p>
  
  <p>I need to identify the row of the button click.Button is added  dynamically throught a data repeater</p>
  
  <pre><code>@for (int i = 0; i &lt; Model.lstUPC.Count; i++)
  {
    &lt;div class="col-md-1 addDelete"&gt;
      &lt;input type="submit" value="+" class="form-control" name="UPCRowAdd" id="MPNet" /&gt;
    &lt;/div&gt;
    &lt;div class="col-md-1 addDelete"&gt;
      &lt;input type="submit" value="-" class="form-control" name="UPCRowAdd" id="MPNet" /&gt;
    &lt;/div&gt;      
  }
  </code></pre>
  
  <p>Controller code</p>
  
  <pre><code>[HttpPost]
      public ActionResult ItemSetup(ItemSetupModel itemSetupModel,  string UPCRowAdd, string command)
      {
          string queryString = string.Empty;
          if (UPCRowAdd == "+")
          {                     
                  UPC upc = new UPC();
                  itemSetupModel.lstUPC.Add(upc);                   
           }
      }
  </code></pre>
  
  <p>Model code</p>
  
  <pre><code>namespace PricingUpdates.Models
   {
     public class UPC
     {
      public string ItemNumberForUPC { get; set; }
      public string GCOwner { get; set; }
      public string GCFeeItem { get; set; }
      public string GCBranded { get; set; }
      public string query { get; set; }
  
    }
    public class ItemSetupModel
    {
    public StoreSelectionModel storeSelectionForUPC { get; set; }
    public List&lt;UPC&gt; lstUPC { get; set; }  
    } 
  }  
  </code></pre>
  
  <p>I have the button being generated dynamically ie based on the lstUPCCount(a list).Now whenever a button is clicked i need to identify which position or the index of the button clicked.How can i identify that.</p>