user1357737
user1357737

Reputation: 101

Space added at the end when rendered in HTML

I display name using value from model.

<div>
 @Modle.Name
</div>

Value is "Sam". But when i inspect this div in browser's developer tool, I could see some spaces added at the end as below.

<div>Sam     </div>

I tried below to remove those spaces but spaces are not removed.

TrimEnd()
Substring

Please suggest.

Upvotes: 1

Views: 44

Answers (1)

Jamiec
Jamiec

Reputation: 136074

Perhaps just inline it

<div>@Modle.Name</div>

The extra spaces probably wont make a difference though.

Upvotes: 4

Related Questions