试题详情
单项选择题下面那个代码段正确的增加了一个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
  • 关注下方微信公众号,在线模考后查看

热门试题