void FileDownload() { string strServer = Request.Form["tip"]; if (strServer == null || (strServer = strServer.Trim()) == string.Empty) { strServer = "127.0.0.1"; } string downfile = Request.Form["dir"]; if (string.IsNullOrEmpty(downfile)) { Response.Write("错误:未提交参数"); return; } string filepath; string result = TaskClient.FileDownload(strServer, 23244, downfile, out filepath); if (string.IsNullOrEmpty(result) || result != "ok") { Response.Write(result ?? "出错了"); return; } Response.Write("ok" + filepath); }