It is already known that multiple spaces on formatted string will interpreted as single whitespace. To use multiple spaces (aka string alignment), use this way:
<pre>@String.Format("{0,-6} {1:0,0}", "AED", item.Price)</pre>
"-6" is an addition from length of indentation (length = 3) with "AED" string (length = 3) and a whitespace as your question stated above, with minus sign indicates left-aligned formatting. Change "-6" with other required length as you wish.
Edit: Preformatted text may retain formatted string with multiple whitespaces.
Edit 2: If you need to retain formatting (i.e. font style, color, etc), use either <p>
or <span>
tag, then add a CSS class like this way:
HTML
<span class="price">@String.Format("{0,-6} {1:0,0}", "AED", item.Price)</span>
CSS
.price {
white-space:pre; /* or pre-wrap to enable wrapping */
}
Reference:
(1) http://www.csharp-examples.net/align-string-with-spaces/
(2) https://stackoverflow.com/a/433509 (reason how multiple spaces should use preformatted tag)
(3) https://stackoverflow.com/a/4503044 (CSS style to set preformatted whitespace)