c# webbrowser occasionally doesn't show website (timeout?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • z1freeride
    New Member
    • Feb 2009
    • 36

    c# webbrowser occasionally doesn't show website (timeout?)

    I have a c# web browser that points to one website. About 1 out 100 times nothing is displayed.

    I tried to solve it with a more refined refresh button. Here is what I am doing when I click the refresh button:

    Code:
    if (browser.Document.Title.ToString() != "")
    {
        browser.Refresh();
    }
    else
    { 
        MessageBox.Show("web browser timeout?");
        browser.Stop();
        browser.Navigate("http://www.mysite.com");
    }
    I am successful in displaying the MessageBox when the web browser is blank and when I click my refresh button. But the web browser doesn't seem to respond.

    Any ideas?
Working...