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

微软认证考试

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

You work as a Web Application Developer at Certkiller.com. You make use of .NET Frameworkv3.5 to create an ASP.NET application.  You decide to create a Web user control named KingShare. KingShare is compiled as a library.The code segment below is written for KingShare. (The line numbers is included for reference purposes) 1 protected override void OnInit(EventArgs e) 2 { 3 base.OnInit(e); 4 5 }  The master pages in the application contains the <%@ Master Language="C#" EnableViewState="false" %> directive. You receive an instruction from the network administratorto make sure that the KingShare state is able to persist on the pages that reference the masterpage. You should thus identify the appropriate code segment you need to add to line 4 to achievethis.  What should you do?()

  • A、Your best option would be to insert Page.RegisterRequiresPostBack(this)
  • B、Your best option would be to insert Page.RegisterRequiresControlState(this)
  • C、Your best option would be to insert Page.UnregisterRequiresControlState(this)
  • D、Your best option would be to insert Page.RegisterStartupScript("KingShare","server")
正确答案:B
答案解析:
进入题库查看解析

微信扫一扫手机做题