These are useful codes to render your asp.net control output into string.

http://weblogs.asp.net/guys/archive/2004/05/30/144539.aspx