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

Load existing html into table cell

P: n/a
Hi all

How can I load an existing html file into a table cell for display?

Setting the TableCell.Text to an existing web file path only displays
the path of the file, but not the file itself.

System.Web.UI.WebControls.TableCell c =
(TableCell)Page.FindControl(sMainCell);

c.Text = ".\\OrigSite\\index.htm";
displays .\\OrigSite\\index.htm
on the page

thanks
jeff
Feb 6 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello Jeff,

Why not to add the content of the file directly to .Text property?!

Maybe you need to use <includehtml tag?!

JUHow can I load an existing html file into a table cell for display?
JU>
JUSetting the TableCell.Text to an existing web file path only
JUdisplays the path of the file, but not the file itself.
JU>
JUSystem.Web.UI.WebControls.TableCell c =
JU(TableCell)Page.FindControl(sMainCell);
JUc.Text = ".\\OrigSite\\index.htm";
JU>
JUdisplays .\\OrigSite\\index.htm
JUon the page

---
WBR, Michael Nemtsev [C# MVP]. Blog: http://spaces.live.com/laflour
team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Feb 6 '07 #2

P: n/a
Michael
I am trying to add the html to the text property of the cell, but I
need to do it dynamically, at run time. The desired end result it to
read the filename from a database and then plug it into the table on
the fly.

It would seem to me that the html file would have to be read in and
then the stream of text somehow placed into the cell. I can not figure
out how to do this.

Not sure what is an include tag in html. Dont see any reference to it
in my references. I did try an "embed" tag, but that doesnt work.

Any othe ideas?
Thanks
Jeff
On Tue, 6 Feb 2007 10:39:01 +0000 (UTC), Michael Nemtsev
<ne*****@msn.comwrote:
>Hello Jeff,

Why not to add the content of the file directly to .Text property?!

Maybe you need to use <includehtml tag?!

JUHow can I load an existing html file into a table cell for display?
JU>
JUSetting the TableCell.Text to an existing web file path only
JUdisplays the path of the file, but not the file itself.
JU>
JUSystem.Web.UI.WebControls.TableCell c =
JU(TableCell)Page.FindControl(sMainCell);
JUc.Text = ".\\OrigSite\\index.htm";
JU>
JUdisplays .\\OrigSite\\index.htm
JUon the page

---
WBR, Michael Nemtsev [C# MVP]. Blog: http://spaces.live.com/laflour
team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Feb 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.