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

微软认证考试

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

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a custom Web user control named SharedControl. The control will be compiled as a library.  You write the following code segment for the SharedControl control. (Line numbers are included for  reference only.)  01 protected override void OnInit(EventArgs e) 02 {  03 base.OnInit(e);  04  05 }  All the master pages in the ASP.NET application contain the following directive.  <%@ Master Language="C#" EnableViewState="false" %>  You need to ensure that the state of the SharedControl control can persist on the pages that reference a  | English | Chinese | Japan | Korean | - 87 - Test Information Co., Ltd. All rights reserved. master page.  Which code segment should you insert at line 04?()

  • A、Page.RegisterRequiresPostBack(this);
  • B、Page.RegisterRequiresControlState(this);
  • C、Page.UnregisterRequiresControlState(this);
  • D、Page.RegisterStartupScript("SharedControl","server");
正确答案:B
答案解析:
进入题库查看解析

微信扫一扫手机做题