protected void Button1_Click(object sender, EventArgs e) { if(!Page.IsCrossPagePostBack) { String Serials = TextBox4.Text; String[] SerialArray = Serials.Split(','); for (int i = 0; i < SerialArray.Length-1; i++) { Label la = new Label(); la.Text = SerialArray[i]; la.ID = "abc" + i.ToString(); PlaceHolder1.Controls.Add(la); TextBox txtbox = new TextBox(); PlaceHolder1.Controls.Add(new LiteralControl("<input id='txt' name='Textbox" + i + "'type='text' />")); PlaceHolder1.Controls.Add(new LiteralControl("<br/>")); }} } protected void Button2_Click(object sender, EventArgs e) { if (!Page.IsCrossPagePostBack) { String Serials = TextBox4.Text; String[] SerialArray = Serials.Split(','); for (int i = 0; i < SerialArray.Length - 1; i++) { Label la = new Label(); la.Text = SerialArray[i]; la.ID = "abc" + i.ToString(); PlaceHolder2.Controls.Add(la); TextBox txtbox = new TextBox(); PlaceHolder2.Controls.Add(new LiteralControl("<input id='txt' name='Textbox" + i + "'type='text' />")); PlaceHolder2.Controls.Add(new LiteralControl("<br/>")); } } } protected void Button3_Click(object sender, EventArgs e) { if (!Page.IsCrossPagePostBack) { String Serials = TextBox4.Text; String[] SerialArray = Serials.Split(','); for (int i = 0; i < SerialArray.Length - 1; i++) { Label la = new Label(); la.Text = SerialArray[i]; la.ID = "abc" + i.ToString(); PlaceHolder3.Controls.Add(la); TextBox txtbox = new TextBox(); PlaceHolder3.Controls.Add(new LiteralControl("<input id='txt' name='Textbox" + i + "'type='text' />")); PlaceHolder3.Controls.Add(new LiteralControl("<br/>")); } } }
Page_Init
Page_Load
ButtonX_Click
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)