试题详情
- 单项选择题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?()
A、Add the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %><%@ mastertype="" virtualpath="~/TestMaster.master">
B、Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %><%@ previouspagetype="" virtualpath="~/TestMaster.master">
C、Set the Strict attribute in the @ Master directive of the TestMaster.master page to true.
D、Set the Explicit attribute in the @ Master directive of the TestMaster.master page to true.%@>%@>
- A
关注下方微信公众号,在线模考后查看
热门试题
- You create&ensp
- You createQ
- You work as an appl
- You have
- You are th
- Your virtual&e
- Your network contain
- You are modifying an
- You have
- 假设你正准备全新安装SQL
- You work
- You are
- Your company&e
- You develop a seria
- Your company has a
- 您在计算机上为孩子设定了「家长监护」功能
- Your company has an
- You are creating an
- Yournetworkconsistso
- You are t