可学答题网 > 问答 > MCTS(70-515)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

You are implementing&#8194


You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master. You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName. protected void Page_Load(object sender, EventArgs e) { string s = Master.CityName; }  You need to ensure that TestPage.aspx can access the CityName property. What should you do?()

  • AAdd the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %>
  • BAdd the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %>
  • CSet the Strict attribute in the @ Master directive of the TestMaster.master page to true.
  • DSet the Explicit attribute in the @ Master directive of the TestMaster.master page to true.
参考答案
参考解析:
分类:MCTS(70-515)题库
相关推荐

1、You are implementing 

You&#8194;are&#8194;implementing&#8194;an&#8194;ASP.NET&#8194;Web&#8194;site.&#8194;The&#8194;root&#8194;directory&#8194;of&#8194;the&#8194;site&#8194;contains&#8194...

2、You are implementing 

You&#8194;are&#8194;implementing&#8194;an&#8194;ASP.NET&#8194;Web&#8194;site&#8194;that&#8194;will&#8194;be&#8194;accessed&#8194;by&#8194;an&#8194;international&#819...

3、You are implementing 

You&#8194;are&#8194;implementing&#8194;an&#8194;ASP.NET&#8194;application&#8194;that&#8194;includes&#8194;a&#8194;page&#8194;named&#8194;TestPage.aspx.&#8194;TestPag...

4、You are implementing 

You&#8194;are&#8194;implementing&#8194;an&#8194;ASP.NET&#8194;page&#8194;that&#8194;hosts&#8194;a&#8194;user&#8194;control&#8194;named&#8194;CachedControl.&#8194;You...

5、You are implementing 

You&#8194;are&#8194;implementing&#8194;an&#8194;ASP.&#8194;NET&#8194;MVC&#8194;2&#8194;Web&#8194;application.&#8194;You&#8194;add&#8194;a&#8194;controller&#8194;name...

6、You are implementing 

You&#8194;are&#8194;implementing&#8194;an&#8194;ASP.NET&#8194;application&#8194;that&#8194;uses&#8194;data-bound&#8194;GridView&#8194;controls&#8194;in&#8194;multipl...