Hi,

i have the following code written for embedding a word document in a 
web page everything is ok but i do not want it to promt for saving 
the file...i just wat it to display word file in the browser 
itself....so far with this code i am not able to achieve it....it 
still prompts...please help..

Thanks in advance!!

Arun

here is the code:

string filepath = Server.MapPath("IE.doc");
FileInfo file = new FileInfo(filepath);
if (file.Exists)
{
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Disposition", "inline; filename=" + 
file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/ms-word";
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
}

Reply via email to