将POST发送到网页 [英] Sending POST to a web page
本文介绍了将POST发送到网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何将帖子发布到网页?
我希望当页面尝试获取帖子变量时,它会
是程序首先定义的东西。
请帮助,
Ofir。
Hello everyone,
How can I sand a post to a web page?
I want that when the page is trying to fetch a post variable, it will
be something the program defined first.
Please help,
Ofir.
推荐答案
Ofir,
你看过WebClient,还是HttpWebRequest / HttpWebResponse
方法?在所有这些中,您可以将方法设置为POST。在请求中将数据发布到
服务器。
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
" ofiras" < of **** @ gmail.comwrote in message
news:2c ************************** ******** @ e10g2000 prf.googlegroups.com ...
Ofir,
Have you looked at the WebClient, or the HttpWebRequest/HttpWebResponse
methods? On all of them, you can set the Method to "POST" to post data to
the server in the request.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"ofiras" <of****@gmail.comwrote in message
news:2c**********************************@e10g2000 prf.googlegroups.com...
大家好,
如何打沙发布到网页?
我希望当页面试图获取一个post变量时,它将是b / b
是程序首先定义的东西。
请帮助,
Ofir。
Hello everyone,
How can I sand a post to a web page?
I want that when the page is trying to fetch a post variable, it will
be something the program defined first.
Please help,
Ofir.
非常感谢。
我从来没用过C#网,所以对我来说这是新手。
我曾尝试使用WebClient类,但我不明白怎样才能发布数据,所以在PHP或ASP或其他人可以使用把它作为一个
变量。
这个变量有一个名字,在PHP中用于例如它是
Thanks a lot.
I never used net with C#, so it''s new to me.
I''ve tried to use the WebClient class, but I didn''t understand how can
I post data, so in PHP or ASP or others they can take it as a
variable.
This variable has a name and in PHP for e.g. it''s
_POST [''name'']。
我认为WebClient类中的方法UploadString对我有帮助。
看起来像:
UploadString(地址,方法,数据)
地址是http地址,方法会发布,但我没有
了解如何确定post变量的名称和他的
内容。
我在哪里得到回复?我可以获取
页面的URL和html代码吗?我可以在WebBrowser中看到它吗
我的表格吗?
谢谢,
Ofir。
(对不起,如果我有语法或拼写错误,我不懂英语
非常好)
_POST[''name''].
I thought the method UploadString in the WebClient class will help me.
It looks like:
UploadString(adress,method,data)
The address is the http address, the method will be post, but I didn''t
understand how to determine the name of the post variable and his
contents.
And where do I get the respond? Can I get the URL and html code of the
page, which I have been directed to? Can I see it in the WebBrowser in
my form?
Thanks,
Ofir.
(Sorry if i have grammer or spelling mistakes, i don''t know english
very good)
这篇关于将POST发送到网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文