hello Sir,
above code line is not working ,this code can not find that wether file is available or not.
i am sending you the my code
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div class="col-md-12 col-sm-12 col-xs-12">
<asp:Literal ID="ltEmbed" runat="server"/>
</div>
</form>
</body>
</html>
protected void Page_Load(object sender, EventArgs e)
{
SetTrace_PDF();
}
public void SetTrace_PDF()
{
try
{
string FilePath = "~\\Sample.pdf";
Response.Write(File.Exists(FilePath) ? "File exists." : "File does not exist.");
ltEmbed.Text = string.Format("<object data=\"{0}\" type=\"application/pdf\" width=\"1000px\" height=\"500px\"></object>", ResolveClientUrl(FilePath));
}
catch (Exception ex)
{
}
}