string sqlstr = "select * from ExtendMail where UserID= 1";
DataSet ds = new DataSet(); ds = userinfo.GetDateSet(sqlstr, "tab");
for (int i = 0; i < ds.Tables["tab"].Rows.Count; i++)
{ //文本框 TextBox myTextBox = new TextBox();
myTextBox.ID = "myBox" + i;
myTextBox.Text = ds.Tables["tab"].Rows[i]["ExtendMail"].ToString();
//绑定数据 PlaceHolder1.Controls.Add(myTextBox); } //按钮
Button myBtn = new Button(); myBtn.ID = "myBtn";
myBtn.Text = "修改"; myBtn.Click += new System.EventHandler(btn_Click); /
/响应事件 PlaceHolder3.Controls.Add(myBtn);