473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

get HTML code of table created dynamically ????

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
4 2666
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Free-Ed, Ltd. | last post by:
I am going nuts trying to find a paragraph in a book that described how to change the text content (HTML) in a DIV. Actually I have an array of HTML strings that I want to drop into the DIV,...
2
by: buran | last post by:
Dear ASP.NET Programmers, I have a HTML table (running as server control with the control ID: tblInsertSP). The table has 16 rows with textboxes. Depending on the value of the ddlSPType, which...
4
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
1
by: Al Wilkerson | last post by:
Hey, I have a Web Form with a drop down list, textbox, and search button. When click the search button an SQL server database is queried fordata. Once I have the data in a dataset I use the...
1
by: Marcus | last post by:
I have a problem maybe one of you could help me with. I've created a data entry screen with lots of dynamically-created client-side controls. I create HTML texboxes client-side by assigning a...
6
by: Ros_Au | last post by:
I create a table dynamically using VB, How do I get HTML code for that table into a string variable ??? any sugestion, Thanks!!!
3
by: Aur_Ros | last post by:
I am showing a table in a web page, I need help to email this table, please any sugestion ....? thanks!!
3
by: balurajeev | last post by:
Hii, currently i am working on an apliction(ASP.NET/C#) that creates dynamic html rows which contain six html text boxes and a html dropdowllist. At the time of page load the web page contain six...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
2
by: Conrad Lender | last post by:
On 2008-10-10 19:56, T.G. wrote: This doesn't work at all, at least not in Firefox. When any of the "up" or "down" links is clicked, the following error occurs: clickedRow.removeNode is not a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.