在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
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); |
请发表评论