public ActionResult DownLoadFile(string Fileid) { if (Session["EmpID"] != null) { DataSet ds = lb.DownloadFile(Convert.ToInt32(Encryption.Base64Decode(Fileid))); return(File((Byte[])ds.Tables[0].Rows[0][0], System.Web.MimeMapping.GetMimeMapping(ds.Tables[0].Rows[0][1].ToString()), ds.Tables[0].Rows[0][1].ToString())); } else { return(RedirectToAction("Index", "LogIn")); } }