Download pdf file using webmothed asp.net
without erorr. can't download file . Please help me.
what error .
[WebMethod]
public static string usernamecheck(string name, string amount, string floder, string getfile)
{
string path = "PrintPDF.pdf";
HttpContext.Current.Response.ContentType = "application/pdf";
HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment; filename=" + path);
// HttpContext.Current.Response.WriteFile(HttpContext.Current.Server.MapPath(path));
HttpContext.Current.Response.TransmitFile(HttpContext.Current.Server.MapPath(path));
//HttpContext.Current.Response.End();
return ""; }