void DirRename(bool isdir) { string strServer = Request.Form["tip"]; if (strServer == null || (strServer = strServer.Trim()) == string.Empty) { strServer = "127.0.0.1"; } string maindir = Request.Form["dir"];// ?? @"E:\WebLogs"; if (string.IsNullOrEmpty(maindir)) { Response.Write("错误:未提交参数"); return; } string newname = Request.Form["newname"]; if (string.IsNullOrEmpty(newname)) { Response.Write("错误:未提交参数2"); return; } string result; if (isdir) { result = TaskClient.DirRename(strServer, 23244, maindir, newname); } else { result = TaskClient.FileRename(strServer, 23244, maindir, newname); } Response.Write(result); }