C# HttpWebRequest form upload
问题 im trying to automate a file upload from my C# program. This is the method to upload a file. public static string UploadFileEx(string uploadfile, string url, string fileFormName, string contenttype, NameValueCollection querystring, CookieContainer cookies) { if ((fileFormName == null) || (fileFormName.Length == 0)) { fileFormName = "file"; } if ((contenttype == null) || (contenttype.Length == 0)) { contenttype = "application/octet-stream"; } string postdata; postdata = ""; if (querystring !=