Load existing html into table cell

  • Thread starter Thread starter Jeff User
  • Start date Start date
J

Jeff User

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
 
Hello Jeff,

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

Maybe you need to use <include> html tag?!

JU> How can I load an existing html file into a table cell for display?
JU>
JU> Setting the TableCell.Text to an existing web file path only
JU> displays the path of the file, but not the file itself.
JU>
JU> System.Web.UI.WebControls.TableCell c =
JU> (TableCell)Page.FindControl(sMainCell);
JU> c.Text = ".\\OrigSite\\index.htm";
JU>
JU> displays .\\OrigSite\\index.htm
JU> on 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
 
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
 
Back
Top