I have a project where I need to post XML files to a secured server. They provided a perl sample, which isn't much use to me, and also this HTML:
<FORM enctype="multipart/form-data" action="<sniped>" method="POST"> <p><INPUT type="file" name="p_xml_file"><BR> <p><INPUT type="submit"> </FORM> That has been tested, and it works. Now, I have managed to communicate with the server correctly and get responses, I just don't know how to "insert" the file into the data stream. This is what I have now... // Create a new string object to POST data to the Url. string postData = "p_xml_file="+ myXmlTextReader.GetRemainder(); ASCIIEncoding encoding=new ASCIIEncoding(); byte[] byte1=encoding.GetBytes(postData); // Set the content type of the data being posted. myHttpWebRequest.ContentType="form-data"; // Set the content length of the string being posted. myHttpWebRequest.ContentLength=postData.Length; However that doesn't seem to be right... myXmlTextReader is a TextReader to the XML file. Can anyone point me in the right direction? TIA Dino --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/2002 You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.