Atul, You can directly read the URL and open a response stream to read the
source/contents.
See if the following code helps, the 'result' string will contain the source
of your webpage.
ttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://www.google.com");
System.Net.WebProxy myProxy = new
System.Net.WebProxy("proxy1.emirates.net.ae", 8080);
myProxy.BypassProxyOnLocal = true;
request.Proxy = myProxy;
request.MaximumAutomaticRedirections = 4;
request.Timeout = 20000;
request.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
string result = readStream.ReadToEnd();
response.Close();
"atul" <at**********@yahoo.comwrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
hi
i m using microsoft web browser component in c#.net
i want that wen i open any url in that then the source of that url
come in my string
example: open any url say,yahoo.com in IE or firefox.
go in View--->source
i want that source to collect in any string or , etc,
i am using microsoft web browser for this how to retrieve that
source???
i want that wen i write any url in textbox of microsoft web browser ,
i get that source
any suggestions
Thanks'
Atul