I'm trying to Post to a site using WebClient in C# but it doesn't seem to Post the values at all
I try posting two strings to a testform that I have set up on my localhost. In the PostBack of the page I update a label to say "Login Succesfull" if the correct username/password have been entered. But the PostBack code is never triggered to begin with after the code below runs. It just returns the login page as the response. What am I doing wrong?
string msSite = "http://localhost/testform";
WebClient oClient = new WebClient();
oClient.QueryString.Add("username", "test");
oClient.QueryString.Add("password", "test");
string msConnect = oClient.DownloadString(msSite);