欢迎来到建筑考试题库网 建筑考试题库官网
全部科目 > 微软认证考试 > MCTS > MCTS(70-515)

单项选择题

You create a Web page named TestPage.aspx and a user control named contained in a file named TestUserControl.ascx.You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which code segment should you use?()

    A.protected void Page_Load(object sender, EventArgs e) { Control userControl=Page.LoadControl("TestUserControl.ascx"); Page.Form.Controls.Add(userControl); }
    B.protected void Page_Load(object sender, EventArgs e) { Control userControl = Page.FindControl("TestUserControl.ascx"); Page.Form.Controls.Load(userControl); }
    C.protected void Page_PreInit(object sender, EventArgs e) { Control userControl =Page.LoadControl("TestUserControl.ascx");Page.Form.Controls.Add(userControl); }
    D.protected void Page_PreInit(object sender, EventArgs e) { Control userControl = Page.FindControl("TestUserControl.ascx"); Page.Form.Controls.Load(userControl); }

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题