Posted on: 3/31/2011 8:41:13 PM | Views : 762

C# code to Open any file (doc,docx,excel,jpg,gif) INSIDE a browser without open/save dialog.
we can check extension by 
 switch (Path.GetExtension(sFullPath).ToLower())
        {
            case ".dwf":
                sContentType = "Application/x-dwf";
                break;
            case ".pdf":
                sContentType = "Application/pdf";
                break;
            case ".docx":
                sContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
     &n ...

Go to the complete details ...