Export to Word

  • Thread starter Thread starter eranhef
  • Start date Start date
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??
 
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
 
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

Similar Threads

export to excel 2
Export to excel !! 4
gridview to excel 6
Export datagrid to excel file 3
Streaming PDF to IE 6.0 browser 3
Export Datagrid to Excel 2
Export datagrid to excel 1
Hello all, 2

Back
Top