M
Matt
Hi,
I am trying to to create a HTTP Request that posts XML that mimics the html
form below.
<form name="Form1" method="post" action="http://test/xml.aspx" id="Form1">
<textarea name="OrderXml" id="OrderXml"
style="height:342px;width:550px;Z-INDEX: 104; LEFT: 65px; POSITION:
absolute; TOP: 84px" rows="1" cols="20"></textarea>
<p>
<input type=submit name='Submit Order' value='Submit Order'>
</form>
I can get the code below to work. Any ideas?
HttpWebRequest httpRequest =
(HttpWebRequest)WebRequest.Create(http://test/xml.aspx);
httpRequest.Method = "POST";
httpRequest.ContentType = "text/xml";
XmlTextWriter xmlWriter = new XmlTextWriter(httpRequest.GetRequestStream(),
System.Text.Encoding.UTF8);
xmlWriter.WriteStartDocument();
//.. Write XML
xmlWriter.WriteEndDocument();
xmlWriter.Close();
HttpWebResponse httpResponse = (HttpWebResponse)
httpRequest.GetResponse();
//.. store XML
I am trying to to create a HTTP Request that posts XML that mimics the html
form below.
<form name="Form1" method="post" action="http://test/xml.aspx" id="Form1">
<textarea name="OrderXml" id="OrderXml"
style="height:342px;width:550px;Z-INDEX: 104; LEFT: 65px; POSITION:
absolute; TOP: 84px" rows="1" cols="20"></textarea>
<p>
<input type=submit name='Submit Order' value='Submit Order'>
</form>
I can get the code below to work. Any ideas?
HttpWebRequest httpRequest =
(HttpWebRequest)WebRequest.Create(http://test/xml.aspx);
httpRequest.Method = "POST";
httpRequest.ContentType = "text/xml";
XmlTextWriter xmlWriter = new XmlTextWriter(httpRequest.GetRequestStream(),
System.Text.Encoding.UTF8);
xmlWriter.WriteStartDocument();
//.. Write XML
xmlWriter.WriteEndDocument();
xmlWriter.Close();
HttpWebResponse httpResponse = (HttpWebResponse)
httpRequest.GetResponse();
//.. store XML