im trying to open a document...but every time i get a dialoge box asking if i want to pen,save or cancel.i just want to open the document.can someone tell me wot im doing wrong?here's my code
if (objView.extension == ".pdf" || objView.extension == ".xls" || objView.extension == ".xlsx" || objView.extension == ".doc" || objView.extension == ".docx")
{
System.Data.DataSet dsImg = new System.Data.DataSet();
dsImg = objView.getBinaryData();
Response.ContentType = "application/Octet-stream";
Response.AddHeader("content-disposition",
"attachment;filename="+ filename);
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
foreach (System.Data.DataRow dr in dsImg.Tables[0].Rows)
{
Response.BinaryWrite((byte[])dr[0]);
}
dsImg.Dispose();
objView.Close();
Response.End();
}