Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an application where a pdf file is opened inside the web form as shown in the below code


XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div>
            <asp:FileUpload ID="FileUpload1" runat="server" />
            <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        </div>
        <div id="divPDF" runat="server">
    <object data="<%=pdfPath%>" type="application/pdf" style="height:500px; width: "500px" >
    </object>
        </div>
    </div>
    </form>
</body>
</html>





C#
protected string pdfPath;
        protected void Page_Load(object sender, EventArgs e)
        {
            divPDF.Visible = false;
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (FileUpload1.FileName != "")
            {
                FileUpload1.SaveAs(Server.MapPath(FileUpload1.FileName));
                pdfPath = FileUpload1.FileName;
                divPDF.Visible = true;
            }
        }


it is working fyn and i can view,read the pdf.
Now whay I need is when i scroll through the pages the current pagenumber should appear in a text box..Can anyone please help me?

its urgent....thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900