views:

2353

answers:

1

I want to make a web request to a page that needs authenticating. How would I go about doing this? I found something that said possibly to use the Credentials property, but I'm not sure how to use it.

+4  A: 

Assign a new NetworkCredential instance to the Credentials property:

webClient.Credentials = new NetworkCredential("Mehrdad", "Password");
Mehrdad Afshari