public void Deladdress() { DataSet dl = Deliverydetails(); int count = dl.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { TableRow tr = new TableRow(); TableCell td0 = new TableCell(); TableCell td1 = new TableCell(); Label lb0 = new Label(); //Label lb1 = new Label(); LinkButton lbl = new LinkButton(); addr = dl.Tables[0].Rows[i]["clad_name"].ToString() + ',' + dl.Tables[0].Rows[i]["clad_line_1"].ToString()); lb0.Text = addr; lb0.ID = Convert.ToString((i + "lb0")); lbl.Text = "UpDate"; lbl.ID = Convert.ToString((i + "lbl")); lbl.Click += new EventHandler(LinkButton2_Click); td0.Controls.Add(lb0); td1.Controls.Add(lbl); tr.Cells.Add(td0); tr.Cells.Add(td1); Table1.Rows.Add(tr); } } protected void LinkButton2_Click(object sender, EventArgs e) { LinkButton btn = (LinkButton)sender; string btnid = btn.ID; // string[] btnid = btn.ID.Split('l'); // int addrId = Convert.ToInt32(btnid[0].ToString()); Response.Redirect("Billi.aspx?id=" + uid + "&action=update&type=billing&addr=" + addr); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)