Export to Word

E

eranhef

Hi all,

I'm trying to export an aspx web page to ms-word.
I'm using this code to export the aspx page:
Response.AddHeader("content-disposition",
"attachment;filename=myFile.doc");
Response.ContentType = "application/vnd.ms-word";

The web page contains an hidden table (style="display:none"). this
table is not shown in the aspx web page.
The problem is, that the word 2003 application displays this table
although i've set it to display:none.

What can i do in order to work-around this problem, and hide the
table??
 
M

Masudur

Hi all,

I'm trying to export an aspx web page to ms-word.
I'm using this code to export the aspx page:
Response.AddHeader("content-disposition",
"attachment;filename=myFile.doc");
Response.ContentType = "application/vnd.ms-word";

The web page contains an hidden table (style="display:none"). this
table is not shown in the aspx web page.
The problem is, that the word 2003 application displays this table
although i've set it to display:none.

What can i do in order to work-around this problem, and hide the
table??

hi...

add runat attribute to that table... and in code behind file set that
table's visible property to false...

Masudur
 
E

eranhef

hi...

add runat attribute to that table... and in code behind file set that
table's visible property to false...

Masudur

Thanks!
Simple, but that solved my problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top