Please refer this code. I have used the property and setting the path in the property and assining that in object.
HTML:
<form id="form1" runat="server">
<div>
<object data='<%=this.Path %>' type="application/pdf" width="500" height="500">
</object>
</div>
</form>
C#:
public string Path { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
// You can also display the file path from the Database
this.Path = "Data/PDF.pdf";
}
Image:
Thank You.