Hello, everyone.
I am stuck with the following:
There is a webpage which contains a webform, which
contains text fields, and submits the data from current
page to another one.
I need to submit the same data to a webpage from a
Windows Form.
I am playing with WebClient's UploadValues(.. .) method
I've also tried
HttpWebRequest
wrq=(HttpWebReq uest)WebRequest .Create("http://localhost/mail.php");
<some code here>
And then HttpWebResponse wrs=(HttpWebRes ponse)wrq.GetRe sponse();
Nothing. I've tried that on my webserver, and it throws an exception with
error 403 from the
server, FORBIDDEN.
localhost/sendmail.php contains:
<form name="f1" action="mail.ph p" method="post">
<table>
<tr>
<td align="left" valign="top">
Your name:
</td>
<td align="left" valign="top">
<input type="text" name="sender" size="50">
</td>
</tr>
etc............ .....OTHER TEXT FIELDS
<tr>
<td align="left" valign="top">
<input type="submit" value="Send email">
</td>
<td align="left" valign="top">
</td>
</tr>
</table>
</form>
localhost/mail.php receives POST'ed data from localhost/sendmail.php and
imails it me
(basically to prevent people/webrobots from seeing my email, so that I don't
get spam).
Works just fine.
But I need to submit (POST) data from a Windows form.
Thanks.
Any help is appreciated.
Regards, Nurchi