473,385 Members | 1,912 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,385 software developers and data experts.

POST/GET from windows form

Hi everyone,
I need to pass a series of parameters to an SMS gateway from a client
application, a windows form application. The question is, HOW?
Is it possible to POST/GET data from a windows form?
Do people use Remoting or Socket to this pourpose?
Thanks a lot.
Nov 24 '05 #1
3 5772
No need to use sockets directly. :8-)

You can use HttpWebRequest class, which is located in System.Net namespace.

send request to the server, using HTTP protocol

//send request
HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create(http://smsgate.net);

//get response
HttpWebResponse response = (HttpWebResponse)myReq.GetResponse ();

watch the docs for the details.
--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com
"Matteo" <Ma****@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.com...
Hi everyone,
I need to pass a series of parameters to an SMS gateway from a client
application, a windows form application. The question is, HOW?
Is it possible to POST/GET data from a windows form?
Do people use Remoting or Socket to this pourpose?
Thanks a lot.

Nov 24 '05 #2
Thanks Vadmyst,

all more clear, now!

Matteo

"Vadym Stetsyak" wrote:
No need to use sockets directly. :8-)

You can use HttpWebRequest class, which is located in System.Net namespace.

send request to the server, using HTTP protocol

//send request
HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create(http://smsgate.net);

//get response
HttpWebResponse response = (HttpWebResponse)myReq.GetResponse ();

watch the docs for the details.
--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com
"Matteo" <Ma****@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.com...
Hi everyone,
I need to pass a series of parameters to an SMS gateway from a client
application, a windows form application. The question is, HOW?
Is it possible to POST/GET data from a windows form?
Do people use Remoting or Socket to this pourpose?
Thanks a lot.


Nov 24 '05 #3
Vadym Stetsyak wrote:
No need to use sockets directly. :8-)

You can use HttpWebRequest class, which is located in System.Net
namespace.

send request to the server, using HTTP protocol

//send request
HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create(http://smsgate.net);

//get response
HttpWebResponse response = (HttpWebResponse)myReq.GetResponse ();

watch the docs for the details.


You can use System.Net.WebClient as well, which is more user-friendly
for basic HTTP operations.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 25 '05 #4

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

Similar topics

15
by: Thomas Scheiderich | last post by:
I am trying to understand Session variables and ran into a question on how they work with data that is passed. I have an HTM file that calls an ASP file and sends the name either by GET or POST....
3
by: Andreas Kviby | last post by:
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"...
6
by: Paul Perot | last post by:
Hi All: I was wondering if it was possible to evoke a post back event during code execution. I have a form that contains file specific information. I would like to iterate through an array of...
0
by: Joeyej | last post by:
Hi - I'm trying to move/use a web form (containing some javascript field checks) previously hosted on a Windows 2000 server. However, the FORM METHOD="post..." command in the form (shown below)...
1
by: Manuel | last post by:
I have to log into a website and retrieve some information. The problem is that the post isn't "normal". I'm used to passing post values in the form of: Variable1=Value1&Variable2=Value2 etc. I...
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...
2
by: mykyp | last post by:
Hi, I am trying to use my vb.net app as a replacement to a normal browser to interface with a website. I am trying to achieve 2 things: 1) logon to the website 2) complete forms and submit data...
6
by: Boldgeek | last post by:
I am trying to develop an app that will allow automatic updating of a web form which uses multipart/form-data enctype (as it MIGHT be sending an image) I have an example form, which when...
3
by: Jag | last post by:
Hi I am facing a strange issue. I have 3 ASP pages in the default website 1. auth.aspx <html> <body>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.