title: Assign Unique id's to buttons in foreach loop
body: <p>I am building online shopping website and at this time there are 3 products in it. Here's the sample of products.</p>
  
  <p><img src="https://i.stack.imgur.com/mSgr2.png" alt="enter image description here"> </p>
  
  <p>First it is a image, product name, description, price, id and "Add to Cart" Button which is build programmatically and It is also dynamically. 
  You can see that every product have its own Button which is also created through foreach loop.
  I am confuse that how can I get those unique id's which I assigned to it? Means when I click on Add to Cart button, it give me id=3 in foreach loop.
  Now, I want a help that how "Add to Cart" button identify that which product is clicked and then show all the specification of product and then Proceed according to it.
  Here's the Sample of Code:
  I am using 3-tier architecture for it and here's the sample of code:</p>
  
  <pre><code>DataSet ds=obj.searching_product();
  DataTable dt = new DataTable();
  dt = ds.Tables["Register_Product"];
  foreach(DataRow dr in dt.Rows)
  {
      Literal li2 = new Literal();
      li2.Text = "&lt;br/&gt;";
      this.Panel1.Controls.Add(li2);
      Label lb1 = new Label();
      lb1.Text = dr["Name"].ToString();
      this.Panel1.Controls.Add(lb1);
  
      //Adding Here's Literal for price, Images and ID etc.
  
      Literal li4 = new Literal();
      li4.Text = "&lt;br/&gt;";
      this.Panel1.Controls.Add(li4);
      Button btn = new Button();
      btn.Height = 19;
      btn.Width = 100;
      btn.Text = "Add to Cart";
      btn.Click += new EventHandler(Button_Click);
      this.Panel1.Controls.Add(btn);
  }
  </code></pre>