if (path != "") { Response.ClearHeaders(); Response.ContentType = "application/octet-stream"; if ((Request.Browser.Browser.ToLower() == "ie") && (Request.Browser.MajorVersion < 9)) { Response.Cache.SetCacheability(HttpCacheability.Private); Response.Cache.SetMaxAge(TimeSpan.FromMilliseconds(1)); } else { Response.Cache.SetCacheability(HttpCacheability.NoCache);//IE set to not cache Response.Cache.SetNoStore();//Firefox/Chrome not to cache Response.Cache.SetExpires(DateTime.UtcNow); //for safe measure expire it immediately } Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName); Response.TransmitFile(strURL); string Viewed = "Viewed - " + fileName; obj.UserId = Session["UserId"].ToString(); obj.DocAccess = Viewed; obj.PageType = "Web"; obj.Message = Session["UserID"] + " has viewed the CCD document " + fileName; int i = NlogObj.Logstore(obj); HttpContext.Current.ApplicationInstance.CompleteRequest(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)