Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a requirement to show SharePoint Webpage through Powershell. I have designed a wpf Xaml and able to show the web browser through powershell.

The Problem is that when clicking on any hyperlinks on the page it throws error "Do you want to continue Running script on this page?". I have tried many ways but unable to suppress the error. Hence, seeking your help.



My Xaml Code:

<Grid
    xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
          

    
            <DockPanel >
                <WebBrowser Name="WebBrowser" DockPanel.Dock="Left" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" >
                </WebBrowser>
            </DockPanel>
    
        
    
</Grid>


I am implementing through hamburger menu. So, the above xaml is the child window of an button. Webpage is displaying perfectly. The problem is with the script error.

Could someone please enlighten me how to suppress this error?

What I have tried:

Original Post:
Posted
Comments
BikashBiswal 26-Jun-20 6:37am    
Please see the error snap on below link:

https://social.technet.microsoft.com/Forums/en-US/a1a50138-6bda-4ceb-820c-4b0f20c42719/powershell-suppress-wpf-webbrowser-script-errors?forum=winserverpowershell
Patrice T 26-Jun-20 6:51am    
Use Improve question to update your question.
So that everyone can pay attention to this information.
Richard MacCutchan 26-Jun-20 7:59am    
Microsoft already gave you the answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900