G
Guest
Hello,
I'm not sure this is the right place for this question, but hopefully
somebody can help.
I'm trying to build an in-memory XML file and submit it to an URL. Here's a
sample code:
//====================================================
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://localhost/localurl.aspx");
request.ContentType="application/x-www-form-urlencoded";
request.Method = "POST";
Stream myStream = request.GetRequestStream();
XmlTextWriter writer = new XmlTextWriter(myStream, null);
writer.WriteStartElement("orders");
writer.WriteAttributeString("value","205");
writer.WriteEndElement();
writer.Flush();
myStream.Close();
//====================================================
For some reason, the URL I'm submitting to does not receive the XML.
Anybody has any ideas why?
Thnks in advance.
I'm not sure this is the right place for this question, but hopefully
somebody can help.
I'm trying to build an in-memory XML file and submit it to an URL. Here's a
sample code:
//====================================================
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://localhost/localurl.aspx");
request.ContentType="application/x-www-form-urlencoded";
request.Method = "POST";
Stream myStream = request.GetRequestStream();
XmlTextWriter writer = new XmlTextWriter(myStream, null);
writer.WriteStartElement("orders");
writer.WriteAttributeString("value","205");
writer.WriteEndElement();
writer.Flush();
myStream.Close();
//====================================================
For some reason, the URL I'm submitting to does not receive the XML.
Anybody has any ideas why?
Thnks in advance.