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

微软认证考试

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

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")>
正确答案:C
答案解析:
进入题库查看解析

微信扫一扫手机做题