Mr.Rendezvous
Mr.Rendezvous

Reputation: 1993

When Refresh the webbrowser Component got a blank page?

Why I got a blank page when I Refresh the web page in webbrowser.

btw here is some of my code in webbrowser:

        webBrowser1.Navigate("about:blank");
        if (webBrowser1.Document != null)
        {
            webBrowser1.Document.Write(String.Empty);
        }

        webBrowser1.ObjectForScripting = true;
        webBrowser1.WebBrowserShortcutsEnabled = false;
        webBrowser1.DocumentText = "<h1>Hallo</h1>";

I have disable keyboard shortcut to denied F5 button but I guess that's not a good solution.

Upvotes: 1

Views: 2650

Answers (1)

Prabhakantha
Prabhakantha

Reputation: 660

Please check some times html variable may initialized to blank inside the refresh code block

Upvotes: 1

Related Questions