protected void list_products_RowCommand(object sender, GridViewCommandEventArgs e) { int RowIndex_ = int.Parse(e.CommandArgument.ToString()); for (int i = 0; i < list_products.Rows.Count; i++) { if (RowIndex_ == i) { GridViewRow selectedRow = list_products.SelectedRow; product objproduct = new product(); objproduct.userid = Convert.ToString(Session["id"]); this.Label5.Text = list_products.SelectedRow.Cells[2].Text; objproduct.productid = list_products.SelectedRow.Cells[2].Text; objproduct.product_name = list_products.SelectedRow.Cells[3].Text; objproduct.product_quantity = list_products.SelectedRow.Cells[4].Text; objproduct.product_type = list_products.SelectedRow.Cells[5].Text; } else { this.Label4.Text = "cant be select"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)