Pages

Monday, June 29, 2009

Tip of the Day: Visiblity issue with the DIV element and MS Word

Problem:
If you have a table inside of a div element and you're hiding your div element by setting the CSS display property to none, if you copy and paste your div element to word from the ASPX web page, then the table and its contents will appear in the word document.

Solution:
Convert the DIV html element into a server control by applying the runat server tag to the control and provide an unique id value.

Code Link: