当前位置:MCTS(70-515)题库

问题:

[单选] You are implementing an ASP.NET MVC 2 Web application that contains several folders. The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values.  The Models folder contains a class named Player with the following definition.Public Class Player   Public Property Name As String   Public Property LastScore As IntegerPublic Property HighScore As IntegerEnd Class  You need to ensure that the custom formatting is applied to LastScore values when the HtmlHelper.DisplayForModel method is called for any view in the application that has a model of type Player. What should you do?()

A . Rename Score.ascx to LastScore.ascx.
B . Move Score.ascx from the Views/Shared/DisplayTemplates folder to the Views/Player/DisplayTemplates folder.
C . Add the following attribute to the LastScore property. <UIHint("Score")>
D . Add the following attribute to the LastScore property. <Display(Name:="LastScore", ShortName:="Score")>

You are troubleshooting an ASP.NET Web application. System administrators have recently expanded your web farm from one to two servers. Users are periodically reporting an error message about invalid view state. You need to fix the problem. What should you do?() Set viewStateEncryptionMode to Auto in web.config on both servers.。 Set the machineKey in machine.config to the same value on both servers.。 Change the session state mode to SQLServer on both servers and ensure both servers use the same connection string.。 Override the SavePageStateToPersistenceMedium and LoadPageStateFromPersistenceMedium methods in the page base class to serialize the view state to a local web server file.。 公安机关欲对犯罪嫌疑人甲(男)、被害人乙(女)进行人身检查,下列正确的是() 只有为了确定被害人、犯罪嫌疑人的某些特征、伤害情况或者生理状态,才可以进行人身检查。 对甲进行人身检查,必要时,可以强制进行,对乙的人身检查,不得强制进行。 检查乙的身体,应当由侦查人员、女工作人员或医师进行。 检查乙的身体,应当由侦查人员或者医师进行。 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 Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadDim s As String = Master.CityNameEnd Sub  You need to ensure that TestPage.aspx can access the CityName property. What should you do?() Add the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %> 。 Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %> 。 Set the Strict attribute in the @ Master directive of the TestMaster.master page to true. 。 Set the Explicit attribute in the @ Master directive of the TestMaster.master page to true.&e。 You are developing an ASP.NET MVC 2 Web application. A page makes an AJAX request and expects a list of company names in the following format. ["Adventure Works","Contoso"] You need to write an action method that returns the response in the correct format. Which type should you return from the action method?() AjaxHelper。 XDocument。 JsonResult。 DataContractJsonSerializer。 如何克服改革的阻力 You are implementing an ASP.NET MVC 2 Web application that contains several folders. The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values.  The Models folder contains a class named Player with the following definition.Public Class Player   Public Property Name As String   Public Property LastScore As IntegerPublic Property HighScore As IntegerEnd Class  You need to ensure that the custom formatting is applied to LastScore values when the HtmlHelper.DisplayForModel method is called for any view in the application that has a model of type Player. What should you do?()
参考答案:

  参考解析

本题暂无解析

相关题目:

在线 客服