Posted on: 6/4/2013 6:59:48 AM | Views : 302

hi..
i am using webmethod to download my file.my webmethod code is..
[System.Web.Services.WebMethod()] public static bool downloadfile(string path) { try { string str = HttpContext.Current.Server.MapPath("~/Files") + "\\" + (HttpContext.Current.Session["ProjectId"]) + "\\" + path; dowloadfile(str); } catch (Exception ex) { return false; } return true; } private static void dowloadfile(string path) { // Create New instance of FileInfo class to get the properties of the file being downloaded FileInfo myfile = new FileInfo(path); // Checking if file exists if (myfile.Exists) { System.Web.HttpResponse Response = System.Web.HttpContext.Current.Response; // Clear the conten ...

Go to the complete details ...