本文介绍了在客户端计算机上而不是在服务器计算机上下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文件在服务器上,我希望它在运行远程URL的客户端计算机上下载。任何解决方案



我尝试过:



A file is on server i want it to download on client machine where the remote URL is running. Any Solutions

What I have tried:

<pre> protected void Lnk_Download_Click(object sender, EventArgs e)
    {
        try
        {
            string RemoteURL = "D:/Balaji/PCRT.DAT";
            string Fname = "PCRTnew.DAT";
            WebClient WB = new WebClient();
            WB.DownloadFile(RemoteURL, @"D:/"+Fname);
            WebMsgBox.Show("File Downloaded to Location- D:/" + Fname,this.Page);

        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }

推荐答案



这篇关于在客户端计算机上而不是在服务器计算机上下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-22 04:50