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

POST/GET to website from inside VB.NET?

I want to make a manual HTTP processor, but need to do GET/POST requests
that could include post data such as button clicks or text fields... i know
i read about this once before in straight .NET code, anyone have any
articles on how to do this? I don't want anything visual, just to get the
contents of the request back as text. thanks!
Jan 4 '07 #1
3 4155
Well I've worked with the web client and I am having problems posting form
data to a page... I keep getting back 405 errors form the server... how do
you post form data to the client and get a response? thanks!

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.comwrote in
message news:FB**********************************@microsof t.com...
Hello
Do a google on the Webclient object and you wil find exactly what you
need

"system.Net.WebClient "
regards

Michel

"Smokey Grindle" wrote:
>I want to make a manual HTTP processor, but need to do GET/POST requests
that could include post data such as button clicks or text fields... i
know
i read about this once before in straight .NET code, anyone have any
articles on how to do this? I don't want anything visual, just to get the
contents of the request back as text. thanks!

Jan 4 '07 #2
"Smokey Grindle" <no****@dontspamme.comschrieb:
>I want to make a manual HTTP processor, but need to do GET/POST requests
that could include post data such as button clicks or text fields... i know
i read about this once before in straight .NET code, anyone have any
articles on how to do this? I don't want anything visual, just to get the
contents of the request back as text.
Check out the code samples on the page referenced below:

<URL:http://dotnet.mvps.org/dotnet/code/net/#CookieRequest>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 4 '07 #3
I forgot the "POST" command, now I feel dumb... works when its in place,
thanks!

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.comwrote in
message news:0D**********************************@microsof t.com...
Aha ,,,,

well i couldn`t get that information in your original post , thought you
just needed to know how , not that you do know how but couldn`t get it to
work .

Maybe it was / is a good idea to show what you have
well this example might give you an idea

Dim oWc As New System.Net.WebClient()
Dim Vals As New
System.Collections.Specialized.NameValueCollection ()
Vals.Add("bla1", "value of 1")
Vals.Add("bla2", "value of 2")
Dim byteBuffer As Byte()
byteBuffer =
oWc.UploadValues("http://www.example.com/justaname.aspx", "POST", Vals)
Dim sBuffer As String=
System.Text.Encoding.Default.GetString(byteBuffer)
regards

Michel Posseth


"Smokey Grindle" wrote:
>Well I've worked with the web client and I am having problems posting
form
data to a page... I keep getting back 405 errors form the server... how
do
you post form data to the client and get a response? thanks!

"Michel Posseth [MCP]" <Mi**************@discussions.microsoft.comwrote
in
message news:FB**********************************@microsof t.com...
Hello
Do a google on the Webclient object and you wil find exactly what you
need

"system.Net.WebClient "
regards

Michel

"Smokey Grindle" wrote:

I want to make a manual HTTP processor, but need to do GET/POST
requests
that could include post data such as button clicks or text fields... i
know
i read about this once before in straight .NET code, anyone have any
articles on how to do this? I don't want anything visual, just to get
the
contents of the request back as text. thanks!



Jan 4 '07 #4

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

Similar topics

4
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most...
6
by: Pete Mahoney | last post by:
I am trying to 'POST' values from a form in a ASP file that has anonymous access permissions. I can retrieve the form values when I redirect to this page from another page which has also has...
3
by: Grytpype-Thynne | last post by:
Can anyone point me in the direction of a cross browser way of displaying two addresses side by side after some preliminary text? I have tried a containing box and floating two further boxes...
2
by: yburtin | last post by:
Hi, I'm currently working on a dotnet web application and here is the problem I have: On my computer (french version of xp pro), I have my webserver installed. Inside one of my webpages, I...
10
by: Amelyan | last post by:
It takes VS 2005 1, 2, and somtimes 3 MINUTES to compile ASP.NET 2.0 website when external DLL is modified. As a matter of fact, when I click 'Build', it looks like VS 2005 hangs for most of that...
1
by: sck10 | last post by:
Hello, Can you set up a website inside of a website. I have a main website at our company: parentwebsite.web.company.com. In the path are a couple of directories: ...
2
by: Rob Dob | last post by:
Hi, How do I go about installing another Web Site Project inside my existing VS2005 website project. I currently have both a forum WSP and my main WSP application within the same solution. Both...
3
by: Yourself | last post by:
Hi, I'm trying to post data to PayPal for a shopping cart, basically I want to replicate a form like the following, but create the variables dynamically from code behind: <form...
3
by: vikramp | last post by:
Hi, I want to know how to setup the "Under Maintenance" page for the website? Here is the thing: I have application setting in web.config called "MMode". I set it to "Y" when I need to do...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.