WebPart on Sharepoint downloads a file locally - I need to send it to the client

丶灬走出姿态 提交于 2020-01-02 19:06:20

问题


please help me to Download file on the machine that use Sharepoint Site not the machine that has sharepoint server.

public class WebClientBL
{
    static WebClient client_ = new WebClient()
    {
        Credentials = CredentialCache.DefaultNetworkCredentials
    };

    public static void DownloadToClient(string path_in_sp, string path_in_local)
    {
        try
        {
            client_.DownloadFile(path_in_sp, path_in_local);
        }
        catch (Exception ex)
        {

        }
    }
}

来源:https://stackoverflow.com/questions/22659661/webpart-on-sharepoint-downloads-a-file-locally-i-need-to-send-it-to-the-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!