【发布时间】:2015-02-06 12:29:25
【问题描述】:
我正在尝试在子字符串的末尾添加一个省略号,但在 Html.Raw 的末尾和  … 之间有一个空格。
我的实际代码是:
<div class="teaser"><p>@Html.Raw(contentItem["Teaser"].Substring(0, 100) + "&nbsp;&hellip;")</p></div>
但是输出是...
This is the output and there's a space befo ...
但我想要...
This is the output and there's a space befo...
【问题讨论】:
-
你能把
"&nbsp;&hellip;"改成"&hellip;"吗?