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

convert Table to HtmlTable and Word.Table

P: n/a
Hi all!

I have a table like
Table myTable = new Table();

Now, I want to publish the table as part of a webpage and as part of a word
document. I tried to convert the table, but the compiler say
"Cannot convert type 'System.Web.UI.WebControls.Table' to
'System.Web.UI.HtmlControls.HtmlTable'"
if I use (HtmlTable)myTable.

I have also tried to convert HtmlTable to Word.Table without look.

I need either convert:
- Table to HtmlTable and Word.Table
or
- HtmlTable to Word.Table

Is there a way to do that?

Thanks in advance.
Michael
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You would need a component(s) to achieve this. Simple casts I bleieve wont work. If you want to you could create a html table by iterating through the rows and calls collections and manually bulding an HTML string.
Nov 16 '05 #2

P: n/a

"Rasika" <ra**********@luckymail.com> wrote
You would need a component(s) to achieve this. Simple casts I

bleieve wont work. If you want to you could create a html table by
iterating through the rows and calls collections and manually bulding
an HTML string.

Rasika,

thanks for assistance. But unfortunately bad news for me. I will
follow your suggestion and go through the rows and calls collection to
build my HtmlTable and Word.Table. If someone has further suggestion,
don't hesitate to post! It would be nice if there are a quicker
solution to accomplish that.

Michael

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.