5
shouts

Web 2.0 | Did you know.. How to download file from web service using JavaScript or Jquery?

posted by farooqkaiserfarooqkaiser 716 days, 18 hours, 15 minutes ago
Tuesday, February 23, 2010 9:32:51 PM GMT

Here is our Web service in C#. 1: [WebMethod] 2:publicvoid DownloadFile(string fileName) 3: { 4: HttpContext returnContext = HttpContext.Current; 5:string url = "http://localhost" + @"/" + fileName; 6: 7: FtpWebRequest ftpRequest = (FtpWebRequest)FtpWebRequest.Create(new Uri(url)); 8: ftpRequest.Credentials = new NetworkCredential(UserId, UserPassword); 9: ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile; 10: 11:using (FtpWebResponse ftpResponse...

category: Web Service | clicked: 0 | | source: www.fairnet.com | show counter code
tags: C#, file download, JavaScript, jQuery, Web Service

No comments yet, be the first one to post comment.

To post your comment please login or signup