Convert server side html control to string
Copy this code and paste it in your HTML
var sb
= new StringBuilder
(); var sw
= new StringWriter
(sb
); var htw
= new HtmlTextWriter
(sw
); PriceTable.RenderControl(htw); //this holds an Table object
return sb.ToString();
Report this snippet
Comments
Subscribe to comments