i taired a lot of to download a file using webmethod.my ajax function is ok but when i click my download button it shows no result.
//this is my c# code...
[System.Web.Services.WebMethod()]
public static string downloadfile(string path)
{
try
{
string str = HttpContext.Current.Server.MapPath("~/Files") + "\\" + (HttpContext.Current.Session["ProjectId"]) + "\\" + path;
// Create New instance of FileInfo class to get the properties of the file being downloaded
FileInfo myfile = new FileInfo(str);
// Checking if file exists
if (myfile.Exists)
{
//System.Web.HttpResponse Response = System.Web.HttpContext.Current.Response;
// Clear the content of the response
HttpContext.Current.Response.ClearContent();
// Add the fil ...
Go to the complete details ...