get HTML code of table created dynamically ????

  • Thread starter Thread starter Rosau
  • Start date Start date
R

Rosau

I create a table dynamically using VB, How do I get HTML code for
that table into a string variable ??? any sugestion, Thanks
 
I create a table dynamically using VB, How do I get HTML code for
that table into a string variable ??? any sugestion, Thanks

You can use the RenderControl method and send it to an HtmlTextWriter
(which can be initialized to write to a StringWriter).
 
Could you please give me an example... how to use this RenderControl
Method and HtmlTextWriter, Thanks !!!
 
Dim sb As New System.Text.StringBuilder()
Dim sw As New StringWriter(sb)
Dim hw As New Web.UI.HtmlTextWriter(sw)

ptable.RenderControl(hw)

and then sb.ToString()




Rosau said:
Could you please give me an example... how to use this RenderControl
Method and HtmlTextWriter, Thanks !!!
 
Thanks a lot! it is working perfect!!!
pb said:
Dim sb As New System.Text.StringBuilder()
Dim sw As New StringWriter(sb)
Dim hw As New Web.UI.HtmlTextWriter(sw)

ptable.RenderControl(hw)

and then sb.ToString()
 
Back
Top