I've recently started to use a e-commerce cart online, and wanted to make a app. But they gave me a HTML code snippet that I can embed in my own website, that I have. But is there a way I can embed this into my c# form application, and a Android Studio application?
You need to first complete the HTML. The code you've shown is just
script. You can't add it to your
webBrowser because it's not valid HTML.
Complete the HTML
<body> <head> <HTML> tags you don't have a complete HTML document.
Then you can either do this as a string, or target the ".HTML" source file. Or, or, or. This has quite a bit of flexibility. See here for the MSDN info on the WebBrowser class.
As this article describes:
// make your string string myHTML = "<html>...</html>"; WebBrowser wb = new WebBrowser(); //make you WebBrowser instance wb.DocumentText = myHTML; //set your HTML wb.DocmentText = "<html>...</html>"; // you can also do a direct assignment