Convert string to WebControls - asp.net
If you see the following code Table tblTest = (Table)tblControl; StringBuilder text = new StringBuilder(); StringWriter writer = new StringWriter(text); HtmlTextWriter htmlWriter = new HtmlTextWriter(writer); tblTest.RenderControl(htmlWriter); htmlCode = text.ToString(); here i am converting a table object to string. I'll get the output as "<table><tr><td>item</td></tr></table>" Now i want to Rollback it. I am having a string and i need to convert that into WebControls.Table object. Please someone suggest some way. Create a map of the name an HtmlControl is rendered with to the control. Then