By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,077 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,077 IT Pros & Developers. It's quick & easy.

get HTML code of table created dynamically ????

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

Oct 5 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In article <11**********************@h48g2000cwc.googlegroups .com>,
au*****@hotmail.com says...
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).

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 5 '06 #2

P: n/a
Could you please give me an example... how to use this RenderControl
Method and HtmlTextWriter, Thanks !!!

Patrick Steele wrote:
In article <11**********************@h48g2000cwc.googlegroups .com>,
au*****@hotmail.com says...
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).

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 6 '06 #3

P: n/a
pb


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" wrote:
Could you please give me an example... how to use this RenderControl
Method and HtmlTextWriter, Thanks !!!

Patrick Steele wrote:
In article <11**********************@h48g2000cwc.googlegroups .com>,
au*****@hotmail.com says...
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).

--
Patrick Steele
http://weblogs.asp.net/psteele

Oct 6 '06 #4

P: n/a
Thanks a lot! it is working perfect!!!
pb wrote:
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" wrote:
Could you please give me an example... how to use this RenderControl
Method and HtmlTextWriter, Thanks !!!

Patrick Steele wrote:
In article <11**********************@h48g2000cwc.googlegroups .com>,
au*****@hotmail.com says...
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).
>
--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 7 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.