1
Reply

Credential Login help

chris

chris

Apr 29 2009 5:27 PM
2.8k
I've been attempting this for days now, and I fear all the little snippets of code I use are wrong. Mostly all the apps I make are binary editors. I am not too good with the web/http request. Can someone please help me just with a few lines on how to login to a page with the email and password box on the form. The page is a live ID page, and once I log in I need to navigate to a page, while staying logged in, then download the string. Here is code and parts I need help with:

//This sets it up:

 HttpWebRequest req = (HttpWebRequest)WebRequest.Create("my site");
req.Credentials = new NetworkCredential(email.Text, pass.Text);

//This is where I need help on logging in with the supplied credentials and navigating to my next page.

//This is how I download the string one I get there.
WebClient wc = new WebClient();
wc.DownloadString("current URL");

Answers (1)