[WebMethod] public static void fileDownloadUsingWebMethod(object dataPath) { string saveBasePath = ""; string folderName = ""; saveBasePath = HttpContext.Current.Server.MapPath("~/developeruploads/MindShare/"); folderName = "Mindshare"; //[original name,renamed name] string[] strFileName = new string[2]; strFileName = Convert.ToString(dataPath).Split(';'); string strFilePath = Path.Combine(saveBasePath, strFileName[1]); FileInfo fi = new FileInfo(strFilePath); if (fi.Exists) { HttpContext.Current.Session["DwFolderName"] = folderName; HttpContext.Current.Response.Redirect("~/brightableweb/downloading.aspx?file=" + fi.Name.Replace("&", "_") + "&fileName=" + strFileName[0],false); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)