I have a variable ("output") that contains this content:
"<pre>using System; public class Program{ public static void Main() { for (int i = 1; i <= 10; i++) { Console.WriteLine(i); } }}</pre>
"
I've named the html viewer control, "browser".
I call this:
browser.LoadFromString(output);
and this is consistently what displays:
I've tried other code blocks that are much longer and the entire thing displays fine.
What is it about this particular text that's causing it to truncate?
EDIT: the offending character was the < in <=.
If I'm going to be displaying code blocks in the html control, I'm obviously going to need to display < and > symbols.
I thought that by wrapping the code in <pre> tags, it would work.
How can I do this?