Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have web browser control in windows phone 8. i want to load html in my web browser control

my html string is

string htmlstring=
   " <html>
    <head>
    <title>Kayako chat</title>
    </head>
    <body><!-- BEGIN FUSION TAG CODE - DO NOT EDIT! -->
    <div>
    <div id=\"proactivechatcontainer6bahdzbxzq\">
    </div>
    <table border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
    <tr><td align=\"center\" id=\"swifttagcontainer6bahdzbxzq\">
    <div style=\"display: inline;\" id=\"swifttagdatacontainer6bahdzbxzq\">
    </div>
    </td></tr>
    </table>
    </div>
    <script type=\"text/javascript\">
    var swiftscriptelem6bahdzbxzq=document.createElement(\"script\");
    swiftscriptelem6bahdzbxzq.type=\"text/javascript\";
    var swiftrandom = Math.floor(Math.random()*1001); 
    var swiftuniqueid = \"6bahdzbxzq\"; 
    var swifttagurl6bahdzbxzq=\"http://kcs.kayako.com/visitor/index.php?/Default/LiveChat/HTML/HTMLButton/cHJvbXB0dHlwZT1jaGF0JnVuaXF1ZWlkPTZiYWhkemJ4enEmdmVyc2lvbj00LjUzLjI2MzMmcHJvZHVjdD1GdXNpb24mY3VzdG9tb25saW5lPWh0dHAlM0ElMkYlMkZrY3Mua2F5YWtvLmNvbSUyRl9fc3dpZnQlMkZmaWxlcyUyRmZpbGVfY3ViOWcyZXJiZ21yYTM2LnBuZyZjdXN0b21vZmZsaW5lPWh0dHAlM0ElMkYlMkZrY3Mua2F5YWtvLmNvbSUyRl9fc3dpZnQlMkZmaWxlcyUyRmZpbGVfMGdrOWo4a3Q2a21ubjljLnBuZyZjdXN0b21hd2F5PWh0dHAlM0ElMkYlMkZrY3Mua2F5YWtvLmNvbSUyRl9fc3dpZnQlMkZmaWxlcyUyRmZpbGVfc25nMDRlcmI0cnhnZGZpLnBuZyZjdXN0b21iYWNrc2hvcnRseT1odHRwJTNBJTJGJTJGa2NzLmtheWFrby5jb20lMkZfX3N3aWZ0JTJGZmlsZXMlMkZmaWxlXzAwZWw3bHAxaDBoZXRtZy5wbmcKYjIxOWVhMTFkMWQ1ZDA4ZmM2NWQyMTBkOTFmN2JkYjk2NjExNjNhYQ==\";
    setTimeout(\"swiftscriptelem6bahdzbxzq.src=swifttagurl6bahdzbxzq;
    document.getElementById('swifttagcontainer6bahdzbxzq').appendChild(swiftscriptelem6bahdzbxzq);\",1);
    </script><!-- END FUSION TAG CODE - DO NOT EDIT! -->
    </html>";

I did this but not working

var htmlCode = HttpUtility.HtmlDecode(htmlString);
WebView1.NavigateToString(htmlCode);
share|improve this question
You might have an answer for your question [here][1]. [1]: stackoverflow.com/a/16515866/332047 – vonLochow May 14 at 12:34
Doesn't html need a doctype? en.wikipedia.org/wiki/HTML#Document_type_declaration – HMR May 14 at 12:35
@vonLochow:thanks for re[lay...but no i didnt get solution for this link – MansinhDodiya May 14 at 12:49
@HMR:no this html conteain one image....i just want to load this image in my web browser control. – MansinhDodiya May 14 at 12:50
can any one know answer?\ – MansinhDodiya May 15 at 4:39

1 Answer

the best way to do it:

webbrowser1.documenttext = "Html"

if its not working:

        wb.Navigate("");
        do
        {
            Application.DoEvents();
        } while ((wb.ReadyState != WebBrowserReadyState.Complete));
        wb.Document.Body.InnerHtml = "Html";
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.