Skip to content

David Votrubec | Notes about programming

Tag Archives: HtmlTextWriter

How to get text value from HtmlTextWriter in C#

HtmlTextWriter is very nice tool to generate HTML in C#, but it lack ability to get generated HTML as a string. Here is a simple solution: HTmlTextWriter uses internally StringWriter which uses StringBuilder. So you first create StringBuilder and StringWriter, pass them to HtmlTextWriter and when you are done you simply call ToString() on the […]

Posted byDavid VotrubecOctober 19, 2011January 7, 2013Posted inTipsTags: C#, gist, HtmlTextWriter
David Votrubec | Notes about programming, Proudly powered by WordPress.