By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,285 Members | 2,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,285 IT Pros & Developers. It's quick & easy.

Send Xml file to asp page

P: n/a
Hi,
I need to send xml file to an asp page.. I have no idea how to do it... I
only know that I need to do HTTPRequest Post... Could someone help? Maybe
there are some examples on the Web?

Thank you,
Sash
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You have to use XMLHTTP Object e.g.

Dim obj
Dim xmlstring

Set obj = CreateObject("Microsoft.XMLHTTP")
obj.Open("POST", "http://yoururl.asp", False)

dim xmlstring = "<Test id="1">Suresh</Test>"
obj.send(xmlstring)

I hope this one helps...

-Suresh
-----Original Message-----
Hi,
I need to send xml file to an asp page.. I have no idea how to do it... Ionly know that I need to do HTTPRequest Post... Could someone help? Maybethere are some examples on the Web?

Thank you,
Sash
.

Nov 15 '05 #2

P: n/a

Hi Sasha,

There are many ways of doing this.
Normally, you can use the 3 standard ways of sending information to server:
1. Post information from a form.
2. Post information from a form in a hidden frame.
3. Use the XMLHTTP control to send and receive XML information using HTTP
requests.

For more information, please refer to the links below:
http://msdn.microsoft.com/library/de...us/xmlsdk/htm/
xml_concepts2_7kfm.asp
http://www.codetoad.com/xml/xml-dom/xmlhttp.asp
http://msdn.microsoft.com/msdnmag/issues/0400/cutting/

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Sasha" <no@no.com>
| Subject: Send Xml file to asp page
| Date: Thu, 16 Oct 2003 11:54:06 -0800
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <ur**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups:
microsoft.public.dotnet.general,microsoft.public.d otnet.languages.csharp,mic
rosoft.public.dotnet.xml
| NNTP-Posting-Host: filenet-gw.filenet.com 198.3.8.1
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:191902
microsoft.public.dotnet.xml:16673 microsoft.public.dotnet.general:112163
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
| I need to send xml file to an asp page.. I have no idea how to do it... I
| only know that I need to do HTTPRequest Post... Could someone help? Maybe
| there are some examples on the Web?
|
| Thank you,
| Sash
|
|
|

Nov 15 '05 #3

P: n/a
Sasha wrote:
Hi,
I need to send xml file to an asp page.. I have no idea how to do it... I
only know that I need to do HTTPRequest Post... Could someone help? Maybe
there are some examples on the Web?

Thank you,
Sash


Yes, but I forgot to mention that I need to do this in a WinForms
Application....

Sorry.

Nov 15 '05 #4

P: n/a
Then use System.Net.WebRequest.

XmlDocument yourxml;

WebRequest req = WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "text/xml";
XmlTextWriter xw = new XmlTextWriter(req.GetRequestStream(), Encoding.UTF8);
yourxml.WriteTo(xw);
xw.Close();

WebResponse rep = req.GetResponse();
....
etc, etc.

"Sasha Sydoruk" <Ih**********@email.com> wrote in message
news:eg**************@TK2MSFTNGP12.phx.gbl...
Sasha wrote:
Hi,
I need to send xml file to an asp page.. I have no idea how to do it... I only know that I need to do HTTPRequest Post... Could someone help? Maybe there are some examples on the Web?

Thank you,
Sash


Yes, but I forgot to mention that I need to do this in a WinForms
Application....

Sorry.

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.