protected void drpUniversity_SelectedIndexChanged(object sender, EventArgs e) { if (IsPostBack) { if (drpUniversity.SelectedItem.Value.ToString() == "Others".ToString()) { int rowcount = mytable.Rows.Count; HtmlTableRow row = new HtmlTableRow(); row.ID = "tbl_row" + (rowcount + 1); HtmlTableCell cell1 = new HtmlTableCell(); cell1.ID = "tbl_cell1" + (rowcount + 1); HtmlTableCell cell2 = new HtmlTableCell(); cell2.ID = "tbl_cell2" + (rowcount + 1); cell1.Attributes["class"] = "contact"; cell2.Attributes["class"] = "contact"; TextBox tb = new TextBox(); tb.ID = "tbQty" + (rowcount + 1); tb.Width = 276; Label lblotherUniver = new Label(); lblotherUniver.ID = "lbluniversity"; lblotherUniver.Text = "University Name"; cell2.Controls.Add(lblotherUniver); cell1.Controls.Add(tb); row.Cells.Add(cell2); row.Cells.Add(cell1); mytable.Rows.Insert(8, row); mytable.DataBind(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)