下面那个代码段正确的增加了一个TextBox控件到一个名为form1的Web窗体上?()
- A、TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true;
- B、TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; c.Controls.Add(form1);
- C、TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; c.Add(form1);
- D、TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; form1.Controls.Add(c);
正确答案:D
答案解析:有
微信扫一扫手机做题