locked
Image is Not Displaying RRS feed

  • Question

  • User-1473011517 posted

    When Html Print window in web Browser [like Chrome] is invoked by programmatically then the IMAGES in the "Panel" does not appears. It shows only lay out of "Image" tool from toolbox

    Tuesday, July 19, 2016 7:25 AM

All replies

  • User1869050296 posted

    use fiddler or chrome dev tools to see if any path is invalid

    Tuesday, July 19, 2016 8:26 AM
  • User283571144 posted

    Hi vijaypwr61,

    When Html Print window in web Browser [like Chrome] is invoked by programmatically then the IMAGES in the "Panel" does not appears. It shows only lay out of "Image" tool from toolbox

    According to your description, I write a demo on my computer, it works well.
    I uses javascript print function.
    Could you please explain more and post details codes for us to help you?
    More details about my test demo, you could refer to follow codes:

      <script type = "text/javascript">
            function PrintPanel() {
                var panel = document.getElementById("<%=Panel1.ClientID %>");
                var printWindow = window.open('', '', 'height=400,width=800');
                printWindow.document.write('<html><head><title>DIV Contents</title>');
                printWindow.document.write('</head><body >');
                printWindow.document.write(panel.innerHTML);
                printWindow.document.write('</body></html>');
                printWindow.document.close();
                setTimeout(function () {
                    printWindow.print();
                }, 500);
                return false;
            }
        </script>
    <body>
        <form id="form1" runat="server">
        <div>
        <asp:Panel ID="Panel1" runat="server" BorderColor="#990000" BorderStyle="Solid" 
       Height="116px" ScrollBars="Both" style="width:278px">
            <asp:Image ID="Image1" runat="server" Height="59px" ImageUrl="~/3D-Rotating-Carousel-Plugin-with-jQuery-CSS3-Circular-Carousel/demo/img/dirk.jpg" Width="145px" />
       This is a scrollable panel.
       <br />
       <br />
    
       <asp:Button ID="btnpanel" runat="server" Text="Button" style="width:82px" />
    </asp:Panel>
            <asp:Button ID="btnPrint" runat="server" Text="Print" OnClientClick = "return PrintPanel();" />
        </div>
        </form>
    </body>

    Best Regards,

    Brando

    Wednesday, July 20, 2016 6:12 AM
  • User-1902643333 posted

    var panel = document.getElementById("<%=Panel1.ClientID %>");

    This is wrong!

    And you should save the Panel1.ClientID into another variable, and then use the variable value for getElementById.

    Wednesday, July 20, 2016 11:34 AM
  • User-1473011517 posted

    Thank You @Brando. I m using same method as you shown but even though it isFrown

    Friday, July 22, 2016 10:12 AM
  • User-1473011517 posted

    Thank you I ll try

    Wednesday, August 24, 2016 7:42 AM