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.
 
Back
Top