title: Downloading file from WebMethod in asp.net
body: <p>I am using following method to download the file from server to the client</p>
  
  <pre><code>[WebMethod(EnableSession = true)]       
  public static bool AddEtag(string pwd, int id)
  {
       HttpContext.Current.Response.Clear();
       HttpContext.Current.Response.ContentType = "application/vnd.csv";
       HttpContext.Current.Response.AddHeader("content-disposition", "inline; filename=\"" + fileData.FileName + "\"");
       HttpContext.Current.Response.End();
  }
  </code></pre>
  
  <p>but I am not able to download the file at client side.Can it be done using handlers. Any links would be fine</p>