?? Access Denied ??

vmars316 621 Reputation points
2020-08-28T03:54:07.993+00:00

Hello & Thanks ;
Pls , why am I getting this message :
Access Denied
You don't have permission to access "http://learn.microsoft.com/answers/questions/ask.html" on this server.
Reference #18.3c05c617.1598586713.3254030b

Thanks

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,874 questions
{count} votes

2 additional answers

Sort by: Most helpful
  1. vmars316 621 Reputation points
    2020-08-30T15:15:10.633+00:00
    Private Sub Target_self_Click(sender As Object, e As EventArgs) Handles Target_self.Click
        Dim TimesThruCount = 0
        Dim linkElements As HtmlElementCollection =
           WebBrowser1.Document.GetElementsByTagName("A")
        Dim firstLink = linkElements.Cast(Of HtmlElement).FirstOrDefault()
        For Each link As HtmlElement In linkElements
            If link.GetAttribute("target") = "_blank" Then
                firstLink.SetAttribute("target", "_self")
                MsgBox("Current Link =  ", link)
            End If
            TimesThruCount = TimesThruCount + 1
        Next
        MsgBox("TimesThruCount =  " & CStr(TimesThruCount))
    End Sub
    
    0 comments No comments

  2. vmars316 621 Reputation points
    2020-08-30T18:26:06.457+00:00

    vb.net .vb How to put HtmlElement into string format ?
    Hello & Thanks ;
    I am trying to show the current link to see if it has been changed :
    MsgBox("Current Link = ", link)
    But evidently link is not the proper type .
    Error msg: Form1.vb(28,44): error BC30311: Value of type 'HtmlElement' cannot be converted to 'MsgBoxStyle'.

    How to put HtmlElement in proper format ?

    Sorry , your system would't allow me to post code because
    " file references and URL injection type strings" , and it wouldn't allow a snap shot of code even though it is only 77kb , and it wouldn't allow me to click on paperclick icon .
    So I Posted pic here :
    http://vmars.us/VB-Net-Forums/devenv_RGJMSsMHoN.png

    Thanks for your help...

    0 comments No comments