Answers for "c# update webrowsercontrol with string"

C#
0

c# update webrowsercontrol with string

private void DisplayHtml(string html)
{
    webBrowser1.Navigate("about:blank");
    try
    {
        if (webBrowser1.Document != null)
        {
            webBrowser1.Document.Write(string.Empty);
        }
    }
    catch (CastException e)
    { } // do nothing with this
    webBrowser1.DocumentText = html;
}
Posted by: Guest on January-19-2021

C# Answers by Framework

Browse Popular Code Answers by Language