is there any way i can get the corresponding HTML code of a web control?

For example, i have an asp.net table with w/ one row and one cell with the text "sample". I want to get this string:

"<table><tr><td>sample</td></tr></table>"

Is this possible?