locked
Script Errors while using System.Windows.Controls.WebBrowser RRS feed

  • Question

  • I am using the System.Windows.Controls.WebBrowser to navigate to BING map URL, its throwing an error like below. 


     

    SuppressScriptErrors does not appear to be an available attribute on my WebControl.

    I have tried the below, but no luck, control is not displaying anything.  

    Dim activeX As Object = Me.WB1.[GetType]().InvokeMember("ActiveXInstance", Reflection.BindingFlags.GetProperty Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic, Nothing, Me.WB1, New Object() {}) activeX.silent = True

     


    Krishna

    Monday, October 16, 2017 9:35 AM

All replies

  • If you have actually tried setting the WebBrowser.ScriptErrorsSuppressed property to True,  it does not have a SuppressScriptErrors property,  and it did not work,  then perhaps it is because of the following....

     The WebBrowser control emulates Internet Explorer 7 by default and IE7 did not have all the functionality needed to navigate web pages that were designed for newer internet browsers.

     You can make the WebBrowser control emulate newer versions of IE but,  the highest version it can emulate is the highest version you have installed on your computer.  For example,  if you only had IE9 installed on the computer,  then IE9 is the highest version you can make it emulate.  If you have IE11,  then you can make it emulate IE11.

     Crazypennie has given a code example at the link below which will automatically set a registry setting to make your application's WebBrowser control emulate the highest version of IE you have installed.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/bc469203-cb4a-4477-a8b3-996121b424e6/webbrowser?forum=vbgeneral

     


    If you say it can`t be done then i`ll try it

    • Edited by IronRazerz Monday, October 16, 2017 9:48 PM
    Monday, October 16, 2017 4:20 PM
  • Thanks for the reply. Actually we are using this webbrowser control in Silverlight APP to load maps and when we try access Microsoft.Win32.Registry is not accessible in Silverlight can you pls help how we can handle this ?


    Krishna

    Tuesday, October 17, 2017 6:18 AM
  • Hi Dkrishna,

    Since this forum is discussing and asking questions about the Visual Basic programming language, IDE, libraries, samples, and tool, and your issue is more related to Silverlight app, I will move this thread to the more related forum.

    Thanks for your understanding and support.

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 20, 2017 8:08 AM
  • Can any one help on this issue how to handle in Silverlight ??

    Krishna

    Monday, October 23, 2017 7:15 AM