Internet Engineer
Internet Engineer

Reputation: 2534

Show trailing spaces in HTML report field

  1. I am trying to create an email HTML report
  2. Some of the values in the report have trailing spaces
  3. I want to highlight the values that have a trailing space

The value gets highlighted but not the trailing space.

This is what I tried so far.

HTMLReport.Append('<td align='left' valign='top'><span style='background-color: #FFFF00'>')
HTMLReport.Append(.value)
HTMLReport.Append('</span></td>')

Upvotes: 0

Views: 83

Answers (1)

bosnjak
bosnjak

Reputation: 8614

Use &nbsp; instead of space. If you have a variable you want to concatenate, substitute spaces like this:

myValue.Replace(" ", "&nbsp;");

Another approach is to use tables and cells with background color to achieve the effect.

Upvotes: 1

Related Questions