title: How can I add multiple products in "add to cart" page of asp.net c#?
body: <p>I am making a website in which when customer click on add to cart button,then particular product and it's details should display on add to cart page, as I have mentioned below code by using this I can show only one product and it's details.</p>
  
  <pre><code>        DataSet ds = new DataSet();
          con.Open();
          SqlCommand cmd = new SqlCommand("select * from tblProductDetails where ProductId=" + PId, con);
          SqlDataAdapter da = new SqlDataAdapter(cmd);
          da.Fill(ds);
          con.Close();
          productcartlistview.DataSource = ds;
          productcartlistview.DataBind();
  </code></pre>
  
  <p>and by using hidden field I am getting product id.</p>
  
  <pre><code>    Button btn_AddCart = sender as Button;
      HiddenField myhiddenfield =btn_AddCart.NamingContainer.FindControl("hiddenID") as HiddenField;
      int myID = Convert.ToInt32(myhiddenfield.Value);
  
      Response.Redirect("CartPage.aspx?ProdId=" + myID + "");
  </code></pre>
  
  <p>So when I want to add another product, then it has been replaced by new one. I want to show multiple products and their details in listview.How can I do this? Please help me .
  Thank you. </p>