I've Googl-ed/SO'd to death and still nothing seems to work for me. Everything has submitted fine except for the file. I've tried so many things I don't even have the original code prior to trying to get this darn file to transmit. I've tried WebClient, HttpWebRequest, etc. Nothing. I must be missing something trivial. Thanks.
- What should I be using for a class? WebClient? HttpWebRequest?
- What method should I be using to upload values. (I don't really care about parsing a response.)
How do I get the file into the request? From what I understand I should get the bytes and add them to the NameValueCollection of parameters I already have?
if (File.Exists(filepath)) using (var ms = new MemoryStream()) { new FileStream(filepath, FileMode.Open, FileAccess.Read).CopyTo(ms); return Encoding.UTF8.GetString(ms.ToArray()); }