locked
Take print from asp.net page on IE and edge with header footers RRS feed

  • Question

  • User2143567685 posted

    Hi All,

    I am facing issue to take the Printout of Asp.net  page, every time header and footer coming with the website name and website URL. I want to remove through javascript or CSS.

    I did google found Solutions for Chrome and Edge but still getting an issue in IE11.

    Thanks,

    Kapil Khare 

    <gdiv></gdiv>

    Wednesday, July 8, 2020 2:31 AM

All replies

  • User288213138 posted

    Hi kapil Khare,

    I did google found Solutions for Chrome and Edge but still getting an issue in IE11.

    I want to remove through javascript or CSS.

    As far as i know, you can set the Headers and Footers in IE Page Setup.

    But if you want to change through css, you can try the following code, but this needs to adjust the value of the attribute according to what you print.

    @page {
                size: auto; 
                margin: 0mm; 
            }

    Best regards,

    Sam

    Wednesday, July 8, 2020 6:49 AM
  • User2143567685 posted

    Thanks, Sam, for the reply, I want to hide header and footer both on IE. 

    I used the below-mentioned media query to remove header and footer from Chrome as well as Edge but this not supported on IE 11.

    @media print {
    @page {
    margin-top: 0;
    margin-bottom: 0;
    }
    body {
    padding-top: 5px;
    padding-bottom: 5px ;
    }
    }

    <gdiv></gdiv>

    Wednesday, July 8, 2020 4:46 PM
  • User288213138 posted

    Hi Kapil Khare,

    Thanks, Sam, for the reply, I want to hide header and footer both on IE. 

    I used the below-mentioned media query to remove header and footer from Chrome as well as Edge but this not supported on IE 11.

    You only need to set your css properties, and then modify the Page Setup I said above in IE.

    Different browsers have different settings, some settings can only be modified through the browser.

    Best regards,

    Sam

    Thursday, July 9, 2020 2:18 AM