Reputation: 2057
I am trying to display styled text within a DIV. Each note entry needs to be displayed on its own line. I have been trying to add
to the text but I am still not getting the correct result. Each Note has a timestamp and the username which is in bold and that indicates the start of each note.
Here is my current result:
I want the second note(The note in white) to be on the next line. And the third note(The note in red following the note in white) should be on the following line.
Here is the code in my razor view:
<div class="editor-field" id="summary">
<div class="editor-label">
@Html.LabelFor(model => model.Notes)
</div>
<div>
@Html.Raw(Model.Notes);
</div>
</div>
Here is what I am working on in my action:
task.Notes = task.Notes.Replace("<font", "<br /><font");
Here is an example of what a string with several notes looks like:
<font color="DD0000"><b>2/1/2006 - SGULLEDGE</b> PART 48 00200 00 - YOU HAVE COST OF $87.54 - VENDOR CHARGING YOU $116.72
PART 4 00041 00 - PO COST IS $43.44 - VENDOR CHARGING $59.95
PART 48 00228 02 - PO COST IS $67.59 - VENDOR CHARGING $93.27
is the vendors price correct? thanks</font>
<b>2/1/2006 - RSANCHEZ</b> Sharron i have a quote can i please fax it to you ?
Does anyone know how i can get the newlines to appear within this DIV? All help is much appreciated.
Upvotes: 0
Views: 758