Search This Blog

31 May 2011

Creation of textboxes with their ids

protected void Button1_Click(object sender, EventArgs e)
{
ArrayList a = new ArrayList();

int j = Convert.ToInt32(TextBox1.Text);
for (int i = 1; i <=j; i++)
{
t = new TextBox();
t.ID = "text" + i; //getting id of control
Form.Controls.Add(t);
a.Add(t.ID);
Response.Write(t.ID);
}

}

No comments:

Post a Comment