Last active
August 29, 2015 14:09
-
-
Save acatejr/9ea1dbe53500f915da87 to your computer and use it in GitHub Desktop.
Changes an html control into an html string equivalent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static string WriteToHtml(HtmlContainerControl control) | |
{ | |
var stringWriter = new StringWriter(new StringBuilder()); | |
var htmlTextWriter = new HtmlTextWriter(stringWriter); | |
control.RenderControl(htmlTextWriter); | |
return stringWriter.ToString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment