phongka
Member
I have used WebView and StringBuilder to render the HTML page, but the result is not as expected. It seems that CSS or JavaScript is not working. If anyone can identify the error or provide a solution, please guide me. Thank you.
example:
Sub btnInitialize_Click
'Log(xui.DefaultFolder)
sb.Initialize
sb.Append("StringBuilder").Append(CRLF).Append("After").Append("Initialize")
sb.Initialize
sb.Append("<sb>")
sb.Append("<head>")
sb.Append("<link href=""prism.css"" rel=""stylesheet"">")
sb.Append("</head>")
sb.Append("<body>")
sb.Append("<pre><code class=""language-javascript"">")
sb.Append("/* Your code here */")
sb.Append("var b = 'Application_Error';")
sb.Append("</code></pre>")
sb.Append("<script src=""prism.js""></script>")
sb.Append("<script src=""prism-b4x.js""></script>")
sb.Append("<script>")
sb.Append("Prism.highlightAll();")
sb.Append("</script>")
sb.Append("</body>")
sb.Append("</sb>")
txtString.Text = sb.tostring
Dim HTML As String
HTML = File.ReadString(File.DirApp, "web\index.html")
WebView1.LoadHtml(HTML)
End Sub