473,396 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

POST an XML string to a URL from a windows form

I have a HTML-form that I need to be able to POST from my VB.NET client
application and store the resulting XML in a STRING or XML-document.

This is the HTML-form code:
<form name="form1" method="post" action="http://www.ourdomainname.se/xml">
<textarea name="xmlrequest" cols="80" rows="20">
<?xml version="1.0" encoding="UTF-8"?>
<searchgetevents>
<header>
<saler_id>0</saler_id>
<request_id>0</request_id>
<requestdatetime>2005-09-03</requestdatetime>
<responsetype>xml</responsetype>
</header>
<request>
<size>0</size>
<index>0</index>
<event_id>0</event_id>
<eventname></eventname>
<city_id>0</city_id>
<venue_id>0</venue_id>
<venuetype_id>0</venuetype_id>
<venuename></venuename>
<audit_id>0</audit_id>
<program_id>0</program_id>
<programtype_id>0</programtype_id>
<fromdate>2005-09-03 17:00:00</fromdate>
<todate>2005-10-03 17:00:00</todate>
<otavailable>false</otavailable>
</request>
</searchgetevents>
</textarea>
<br>
<input type="submit" name="Submit" value="Send">
</form>

I need to submit that from inside VB windows form and I have tried several
solutions with no success. Please help me solve this urgent issue.

The HTML-form works greats and it will give me this result back in the
browser:
<?xml version="1.0" encoding="ISO-8859-2" ?>
- <response_searchgetevents>
- <header>
<saler_id>0</saler_id>
<request_id>2197</request_id>
<requestdatetime>2005-09-03</requestdatetime>
<responsedatetime>2005-09-03 22:24:29</responsedatetime>
<responsetype>xml</responsetype>
<requestsize>0</requestsize>
<requestindex>0</requestindex>
<responsecount>2</responsecount>
</header>
- <response>
- <event>
<event_id>20</event_id>
<eventdate>2005-09-08 19:00:00</eventdate>
<networkclosetime>1900-01-01 01:00:00</networkclosetime>
<venue_id>3</venue_id>
<venuename>CLIENT 1</venuename>
<venuetype_id>0</venuetype_id>
<audit_id>6</audit_id>
<auditname>ROOM2</auditname>
<city_id>0</city_id>
<cityname>Default</cityname>
<program_id>8</program_id>
<programname>Programname</programname>
<programsubtype_id>3</programsubtype_id>
<arrivalorder>0</arrivalorder>
<ticketavailable>Y</ticketavailable>
<networkvisible>Y</networkvisible>
<eventstatus_id>1</eventstatus_id>
<eventstatus />
<colour>0</colour>
<auditlink />
<programlink />
<picturelink />
</event>
</response>
</response_searchgetevents>

Please help me
Nov 12 '05 #1
1 1621
Hello!
I need to submit that from inside VB windows form and I have tried several
solutions with no success. Please help me solve this urgent issue.


Is there a reason why you have to submit that form and not directly use
HTTP POST from your Application?
The .NET Framework includes classes for HTTP communication:

See <http://msdn2.microsoft.com/library/System.Net.HttpWebRequest>
You just have to set Method to POST and write the request-body yourself,
as a browser would do.
--
Pascal Schmitt
Nov 12 '05 #2

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

Similar topics

1
by: Dave Brown | last post by:
I am attempting to post to a url (https://FakeURL/logon.asp) using the HttpWebRequest class. The response for a succesful post will contain the html for the logon user's default page. We've...
1
by: Jason Ho | last post by:
Hi, I would like to send a jpg file to a HTTP server by POST request. But I am not using a browser to do this, I use a Windows Form instead. I know how to send typical request by POST with code...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
4
by: Natalia | last post by:
Hello, I need to provide the ability to post file and some form elements via our website (asp.net) to the third party website (asp page). On http://aspalliance.com/236#Page4 - I found great...
0
by: barrybevel | last post by:
Hi, I'm trying to login to the www.vodafone.ie website using HttpWebRequest. It works fine with IE/Firefox and the .NET Web Control too, just not with my code. I think it's a redirect 302...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.