Adding space to a text box variable

Hello all,
I have the RadzenText statement and I set the variable _showtimestr string
What I want is more space {_Timeinroom.ToString()} and the X when it displays. I'm using RadzenStack so doing each one seperatly is not work. Any ideas, I have tried adding   and it just displays &nbsp

_showtimestr = $"{_Timeinroom.ToString()} X ";


Hi @KirkGroome,

I'm afraid that I don't understand what you are after. Make sure you've checked our forum FAQ on how to improve your post.

_showtimestr = "11:00"

what is displayed is
11:00 X
and What I want diplayed is
11:00 X

I don’t see any difference.

I'm sorry I should have Checked the message after it posted. as it takes out the extra spaces
11:00 X
11:00 X


This is how all browsers handle spaces by default. What you see isn't something specific to Radzen or this forum.

You should use RadzenText with child content if you want to add HTML or entitiues such as  .

    11:00 &nbsp; &nbsp; &nbsp; X

Of if you have it in a variable:


Finally there is a CSS setting which enables whitespace rendering. You can use it as an alternative:

<RadzenText style="white-space: pre" Text="@myVariable" />