如何在GetLog视图中显示距离后显示“里程”单位描述 [英] How to display the “miles” unit description after the distance in the GetLog view

查看:80
本文介绍了如何在GetLog视图中显示距离后显示“里程”单位描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我准备写MVC,微软考试(70-486),同时准备我经常在考试中遇到一个问题,但我在许多网站上找到了不同的答案。



问题是。



您需要在GetLog视图中的距离后显示里程单位描述。您应该使用哪一行代码来替换GL21系列? (每个正确的答案都提供了一个完整的解决方案。选择所有适用的答案。)



A. @ log.Distance miles



B. @ Htrml.DisplayFor(model => log.Distance)里程



C. @ log.Distance.ToString()@ Html.TextArea (里程)



D. @ Htmi.DisplayFor(model => log.Distance.ToString()+miles)



对于Ref,请参阅链接



在某些网站上给出的答案是A,B,而某些网站给出A,C。我知道A是对的,但在B和C之间哪一个对,为什么?请有人指导我

I am going to write the MVC, Microsoft exam (70-486) while preparing I come across one question frequently asking in the exam but I found a different answer in many websites.

Question is.

You need to display the "miles" unit description after the distance in the GetLog view. Which line of code should you use to replace line GL21? (Each correct answer presents a complete solution. Choose all that apply.)

A. @log.Distance miles

B. @Htrml.DisplayFor(model => log.Distance) miles

C. @log.Distance.ToString() @Html.TextArea ("miles")

D. @Htmi.DisplayFor(model => log.Distance.ToString()+ " miles")

For Ref see this link

In some website the answer given is A, B while some website given A, C. I know A is right, but between B and C which one right and why? Please someone guide me

推荐答案

这篇关于如何在GetLog视图中显示距离后显示“里程”单位描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆