多做题,通过考试没问题!

微软认证考试

睦霖题库>其他计算机考试>微软认证考试

下面那个代码段正确的增加了一个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
答案解析:
进入题库查看解析

微信扫一扫手机做题