Overview

A short snippet to display non-breaking space in CSHTML files. Hope this snippet in helpful.

In some cases you have to write out   in cshtml files. The syntax for this you can find in the code snippet.

Snippet

@foreach (var a in new List<string> {"a", "b", "c"}) {
    @a
    @:&nbsp;
}