foreach (GridViewRow items in OrderItemsGrid.Rows) { //int.Parse(items.Cells[0].Text); itemid = Convert.ToInt32(((Label)items.FindControl("lblItemId")).Text); TextBox txt = (TextBox)items.FindControl("TxtQuantity"); //txt.ID = "txt" + "_" + count.ToString(); int quantity = Convert.ToInt32(txt.Text); string sql_insert = string.Format("insert into OrderDetails(OrderId,ItemId,Quantity)values('{0}','{1}','{2}')", orderid, itemid, quantity); obj.Do_Transaction(sql_insert); ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "alert(' Order done Successfully')", true); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)