hi i use the code, to display the file that I saved in the database.
the question is: why the file can not be performed with a full screen.
protected void View(object sender, EventArgs e)
{
int peraturan_id = int.Parse((sender as LinkButton).CommandArgument);
Session["peraturan_id"] = peraturan_id;
ClientScript.RegisterStartupScript(this.GetType(), "open", "window.open('file_view.aspx','_blank' );", true);
}
if (!IsPostBack)
{
if (Session["peraturan_id"] != null)
{
int peraturan_id = Convert.ToInt32(Session["peraturan_id"]);
string embed = "<object data=\"{0}{1}\" type=\"application/pdf\" width=\"500px\" height=\"300px\">";
embed += "If you are unable to view file, you can download from <a href = \"{0}{1}&download=1\">here</a>";
// embed += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
embed += "</object>";
ltEmbed.Text = string.Format(embed, ResolveUrl("~/FileCS.ashx?peraturan_id="), peraturan_id);
}
}