I have been searching for about 20 minutes, with no luck on answering this question. I would very much appreciate anyone's input on this.
I have one cell (td) inside of a table row, and that cell will contain one line of text most of the time, but will occasionally contain two lines (the exact text that it contains depends on server-side processing). I don't mind so much if the text of one line is mushed together and wraps around, but I need to be able to start a new line if a second line is added. Hence my attempts to use the newline character below.
I can't really break it up into two <td>
elements, and I can't seem to get \n
or <br/>
to work when I include them in the text server-side. If I do that, they are just rendered as plain text inside the cell.
Essentially, I want to be able to avoid analyzing the text with javascript client-side to add special characters. I am not even sure if that would work. Is there some css/html/javascript/jquery trick that might do the job?
The C# code that builds the text is simple enough, here's one example:
caseDueDate = "Reading Response due: " + readingDueDate.ToString();
The Razor code for the field looks like this:
<td>@Model.patients.ElementAt(ii).CaseDue</td>
The correctness of the results coming back is just fine. T'is only the formatting... =)