5

enter image description here

When am work on webBrowser control using wpf Getting error like "script error" even i pasted screen shot here and even some jquery UI and css not working

4
  • 1
    We'll need more information on this one. Commented Sep 1, 2015 at 12:55
  • Xaml:<Grid> <WebBrowser HorizontalAlignment="Left" Height="400" Height="800" VerticalAlignment="Top" Name="Browserurl"/> </Grid> Commented Sep 1, 2015 at 13:11
  • Had you tried my solution? Commented Sep 4, 2015 at 17:47
  • 1
    Possible duplicate of WPF WebBrowser control - how to supress script errors? Commented Nov 14, 2016 at 21:49

3 Answers 3

2

I faced this problem too. I need to create browser application which the web has lot of Jquery, JSON etc and webbrowser control does't work as expected (I'm using Windows 10 and Visual Studio 2015)

As solution, I use cefsharp.github.io which allow me to embed a full-featured standards-complaint web browser into C# or VB.NET project solution without hacking windows registry key. It based on Chromium Embedded Framework. It work like a charm!

enter image description here Just grab nuget packages and create ChromiumWebBrowser class and you are ready to use it.

Sign up to request clarification or add additional context in comments.

Comments

1

You have to change your WebBrowser rendering engine, by default it uses the oldest one.

In this link Microsoft describes how you can do it: http://msdn.microsoft.com/en-us/library/ie/ee330730%28v=vs.85%29.aspx

And you can follow this good answer too. Will the IE9 WebBrowser Control Support all of IE9's features, including SVG?

Pay attention that if you are running a 32 bit app on a 64bit system you must set this key instead

[HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]

I tried the site that fails in your screenshot and works well with this registry change from a WebBrowser.

Comments

1

You can use Microsoft.Web.WebView2 instead. its based on Microsoft edge and can be installed using NuGet.

1 Comment

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.