I am having a string which is multiline in content and I use br tag or "\n" or Environment.newLine for it. Which I finally assign to XMLwriter like
writer.WriteElementString("FINALDESTINATION", valFinalDest);
But after loading the xsl file and writing my html using XmlTextWriter I loose the new line in the resulting html file. Is there any way I could retain the newline in the resulting html file.
Using br tags results in inline br tags in the html, while environment.newline and "\n" does not renders the final html with multiline content but in a single line.
You have 2 options:
br, p, div, etc.pre element, which preserves both spaces and line breaks.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With