How to display the string html contents into webbrowser control?

前端 未结 9 1576
不知归路
不知归路 2020-11-27 06:47

I have a c# win app program. I save the text with html format in my database but I want to show it in a webbrowser to my user.How to display the string html contents into we

9条回答
  •  日久生厌
    2020-11-27 07:25

    Simple solution, I've tested is

    webBrowser1.Refresh();
    var str = "" + sender.ToString() + "";
    webBrowser1.DocumentText = str;
    

提交回复
热议问题