i'm new to c#
the following is my code:
*************** *************** ************
HttpWebRequest myRequest = (HttpWebRequest )WebRequest.Cre ate("http://www.google.com" );
HttpWebResponse myResponse = (HttpWebRespons e)myRequest.Get Response();
myResponse.Clos e();
myRequest = (HttpWebRequest )WebRequest.Cre ate("http://www.mns.com");
myResponse = (HttpWebRespons e)myRequest.Get Response();
myResponse.Clos e();
*************** *************** *************
It works for the first site. i can read the contents of the myRequest object. But i get an error when i try to get the response of the second site.
so how do i get a request from 2 sites? (i'm planning to check for more)
the following is my code:
*************** *************** ************
HttpWebRequest myRequest = (HttpWebRequest )WebRequest.Cre ate("http://www.google.com" );
HttpWebResponse myResponse = (HttpWebRespons e)myRequest.Get Response();
myResponse.Clos e();
myRequest = (HttpWebRequest )WebRequest.Cre ate("http://www.mns.com");
myResponse = (HttpWebRespons e)myRequest.Get Response();
myResponse.Clos e();
*************** *************** *************
It works for the first site. i can read the contents of the myRequest object. But i get an error when i try to get the response of the second site.
so how do i get a request from 2 sites? (i'm planning to check for more)