【问题标题】:Appending ellipsis at end of Html.Raw substring c# razor [closed]在 Html.Raw 子字符串 c# razor 的末尾附加省略号 [关闭]
【发布时间】:2015-02-06 12:29:25
【问题描述】:

我正在尝试在子字符串的末尾添加一个省略号,但在 Html.Raw 的末尾和  … 之间有一个空格。

我的实际代码是: <div class="teaser"><p>@Html.Raw(contentItem["Teaser"].Substring(0, 100) + " …")</p></div>

但是输出是...

This is the output and there's a space befo ...

但我想要...

This is the output and there's a space befo...

【问题讨论】:

  • 你能把" …"改成"…"吗?

标签: c# html razor


【解决方案1】:

  正在添加空格。

【讨论】:

    猜你喜欢
    • 2023-03-27
    • 2020-04-24
    • 2017-06-23
    • 1970-01-01
    • 2023-01-26
    • 2021-12-16
    • 2022-12-11
    • 2016-05-27
    • 2014-03-06
    相关资源
    最近更新 更多