Try With xmlDoc xmlRoot = .CreateElement("TXN") xmlRoot.AppendChild(.CreateElement("HDR")) xmlRoot.SelectSingleNode("HDR").AppendChild(.CreateElement("ID")) xmlRoot.SelectSingleNode("HDR").SelectSingleNode("ID").AppendChild(.CreateTextNode("ABCDE")) .AppendChild(xmlRoot) End With data = System.Text.Encoding.UTF8.GetBytes(xmlDoc.OuterXml) sData = New System.Text.UTF8Encoding().GetString(data) wr = System.Net.WebRequest.Create(url) wr.Method = "GET" wr.ContentLength = Len(sData) rs = wr.GetRequestStream() rs.Write(data, 0, data.Length) rs.Close() wr2 = wr.GetResponse() sr = wr2.GetResponseStream() sr2 = New System.IO.StreamReader(sr) Me.TextBox1.Text = Me.TextBox1.Text & sr2.ReadToEnd Catch x As Exception Me.TextBox1.Text = Me.TextBox1.Text & x.Message.ToString() & vbCrLf End Try
wr = System.Net.WebRequest.Create(url) wr.Method = "POST" wr.ContentLength = Len(sData)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)