Sending a POST request in C#

  • Thread starter Thread starter Ecf Edington
  • Start date Start date
E

Ecf Edington

I am looking to send the same request that is being in the form, but I
would like to reproduce it in C# and get the response back. With
everything I have tried, it looks like I am getting back the invalid
password response page. Here is the HTML:

<HTML>
<HEAD>
<style>
</style>

<SCRIPT language=VBS>
'----------------------------------------------------------------------------
' Yahoo Auto Login, by Bill Scott
'----------------------------------------------------------------------------
' All HTML and script by Bill Scott, April, 2000
' (e-mail address removed)
' http://lettermanstationery.tripod.com

Option Explicit

Dim loginName
Dim password

' Enter your login name and password values here.

loginName="MyLogin"
password="MyPassword"


Sub Window_OnLoad()
a.login.focus
a.login.value=loginName
a.passwd.value=password
a.submitButton.click
End Sub
</SCRIPT>

</HEAD>
<BODY bgcolor=#ffffff>

<!--YAHOO AUTO LOGIN-->
<form method=post action="http://login.yahoo.com/config/login?6ehju97hv688r"

autocomplete=off name=a>
<input type=hidden name=".tries" value="" >
<input type=hidden name=".src" value="ym" >
<input type=hidden name=".last" value="" >
<input type=hidden name="promo" value="" >
<input type=hidden name=".intl" value="" >
<input type=hidden name=".bypass" value="" >
<input type=hidden name=".partner" value="" >
<input type=hidden name=.chkP value="Y">
<input type=hidden name=".done" value="" >

<input name=login size=20 maxlength=32>
<input name=passwd type=password size=20 maxlength=32>
<input type=checkbox name=".persistent" value="Y" >
<input type=submit name=submitButton value="Sign in">

</BODY>
</HTML>
 
Ecf said:
I am looking to send the same request that is being in the form, but I
would like to reproduce it in C# and get the response back. With
everything I have tried, it looks like I am getting back the invalid
password response page. Here is the HTML:

You should rather post your code...

Cheers,
 
Back
Top