string filename = "1.docx";
string filepath= @"......\1.docx";
Response.Clear();
Response.AddHeader("content-disposition","attachment;filename=" + filename);
Response.ContentType = "application/force-download";
Response.WriteFile(filepath);
Response.Flush();
Response.End();
I used this code for opening the document in page load event but it's not showing rather than downloading i want a preview of the document please help me