<asp:Panel ID="pnlDisplay" runat="server" Visible="true" Width="100%"> <iframe width="700px" runat="server" height="800px" id="myPDF"></iframe> </asp:Panel>
protected void grdArticles_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "View") { DataSet ds = obj.getArticlebyId(Convert.ToInt32(e.CommandArgument)); if (ds.Tables[0].Rows.Count > 0) { lblTitle.Text = ds.Tables[0].Rows[0]["ArticleTitle"].ToString(); lblAritcalContent.Text = ds.Tables[0].Rows[0]["ArticleContent"].ToString(); string pdffile = ds.Tables[0].Rows[0]["PdfPath"].ToString(); //string pdf1 = "PdfArtical/" + "Test.pdf" + "#toolbar=0&navpanes=0"; string pdf1 = pdffile; myPDF.Attributes.Add("src", pdf1.ToString()); //myPDF.Style.Add("display", "none"); } else { } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)