[Solved] Embed PDF not working in mobile

Last Reply 5 days ago By pandeyism

Posted 5 days ago

Hi friends,

in click event i viewing pdf document. it works fine in system and laptop. but not opening or viewing in mobile.

please Help

<body>
    <div>
    <form id="form1" runat="server" >
    <asp:LinkButton ID="lnkView" runat="server" Text="View PDF" OnClick="View"></asp:LinkButton>
    <hr />
        <asp:Literal ID="ltEmbed" runat="server"/>
    </form>
    </div>   
</body>

 

    protected void View(object sender, EventArgs e)
    {
        string embed = "<object data=\"{0}\" type=\"application/pdf\" width=\"100%\" height=\"100%\" >";
        embed += "</object>";
        ltEmbed.Text = string.Format(embed, ResolveUrl("~/Files/Mudassar_Khan.pdf"));
    }