Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NET
Hi everybody
 
I want develop a Windows form application as web browser.
I use from bellow code:
 
WebRequest request = WebRequest.Create(this.Url.Text);
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream);
 
this.WebBrowser.DocumentText = reader.ReadToEnd();
                
reader.Close();
 
But I have an error.
this code only create a request while most of web site have many Url therefore I must create a request for any Url in website.
 
How I can load whole of web site files and direction???
 
Please help me
 
Thank a lot
Posted 12-Feb-13 1:05am
Edited 12-Feb-13 1:40am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi every body
 
I solved my problem by bellow code:
 
        private WebBrowser GetCurrentBrowser()
        {
            return (WebBrowser)TabControl.SelectedTab.Controls[0];
        }
 
        private void GoPage()
        {
            GetCurrentBrowser().Navigate(UrlTextBox.Text);
        }
 
Thanks a lot
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 472
1 sanket saxena 355
2 CPallini 205
3 thatraja 200
4 OriginalGriff 195
0 Sergey Alexandrovich Kryukov 8,784
1 OriginalGriff 5,025
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid