473,466 Members | 1,503 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Send Xml file to asp page

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 11 '05 #1
4 7447
"Sasha" <no@no.com> wrote in message
news:ur**************@TK2MSFTNGP10.phx.gbl...
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


Use something like this in an asp script (where strXML is your xml in a
string)
<%
Dim strXML
strXML = "<SendXML><node>Hello world</node></SendXML>"
Dim xmlhttp

'use the ServerXMLHTTP object, if called from an asp page
'because xmlhttp uses winInet, and is not suitable for
'server applications
Set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
xmlhttp.Open "POST", "http://somewebsite.com/receive.asp", False 'make it
async
xmlhttp.send strXML
%>
Nov 11 '05 #2
Hi Sasha,

I agree with Richard, XMLHTTP should be a proper solution for the problem.
For more information about XMLHTTP, you may refer to:

IXMLHTTPRequest
http://msdn.microsoft.com/library/de...us/xmlsdk/htm/
xml_obj_ixmlhttprequest_8bp0.asp?frame=true
Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 11 '05 #3
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 11 '05 #4
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 11 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: edykstra | last post by:
Hello, If you point your browser to this page, http://prdownloads.sourceforge.net/vnc-tight/tightvnc-1.2.9_x86_viewer.zip?use_mirror=umn the server sends you the HTML page, and very soon...
29
by: | last post by:
I did a working code with CDONTS on NT4 Now I am testing is on w2k and it looks like objCDONTS.Send is completely ignored. I think is it ignored because it throws no errors, neither does the...
2
by: Fatih BOY | last post by:
Hi, I want to send a report from a windows application to a web page like 'report.asp' Currently i can send it via post method with a context like local=En&Username=fatih&UserId=45&Firm=none...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
10
by: Aj Blosser | last post by:
Hey guys, I have a question for you, I have a setup where I'm sending files through the POST to a php web page, I read the file contents, put that file contents as text into the POST string, and...
4
by: riteshjain82 | last post by:
Hi, Please go through this: I am having a file (default.asp) on which i am taking many details from a user before mailing it to someone. I have also provided the user with a facility of...
9
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
1
by: steinwaygirl | last post by:
Hi all, I have been searching so hard for the answer to this, hopefully some of you all can help. I have created an HTML file with various forms - also included CSS and some javascript for...
1
by: jerger | last post by:
I have not made a program or page from start yet. I have made modifications to our signoff asp pages like changing the questions, texts, shortening field lengths etc... I also have copied the files...
3
digicrowd
by: digicrowd | last post by:
http://bytes.com/images/howtos/applemail_sig_icon.jpg You can make your emails fancy in Mail.app by using Rich Text formatting or even included Stationery. But, a simple way to send your own HTML...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.