I don’t know if i can’t read the documentation or need to drink another cup of coffee.
I would like to format a decimal into some html. The following code works in that it formats the string however it strips any type of quotation or apostrophe mark added.
private string FormatOutput1 = "{0:<span style='font-size: 14px;'>$0</span>.00}";
private string FormatOutput2 = "{0:<span style=\"font-size: 14px;\">$0</span>.00}";
private string FormatOutput3 = @"{0:<span style=""font-size: 14px;"">$0</span>.00}";
private string FormatOutput3 = "{0:<span style=\'font-size: 14px;\'>$0</span>.00}";
string.Format( FormatOutput, order.OrderTotal ) );
to me always results in (assuming the decimal is 330)
<span style=font-size: 14px;>$330</span>.00
the lack of quotation marks is breaking the desired output. Is there a way around this or something that I am missing.
If you really just want to format the decimal then move the html before the curly brackets:
To accomodate the update, you can escape it with
\but since it is a string, you need to use two\\and also escape the;: