If you create custom controls in ASP.NET, you will probably, sooner or later, be dealing with HtmlTextWriter. This tool allows you to generate HTML tags. It is better, comparing to StringBuilder, because it allows to build a nicely indented markup.
In this example, we'll show you how to debug it, in order to explore its content.
Use the following method.
foreach (Control ctrl in Controls)
string strContents = sb.ToString();