none
how to open a new youtube page via the button?

    Pertanyaan

  • Hi all, how to open a new youtube page via the button "Like"?

    Code button Like:

    My button code:

     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            Dim buttonele As HtmlElementCollection = WebBrowser1.Document.All
            For Each webpageelement As HtmlElement In buttonele
                If webpageelement.GetAttribute("id") = "likeText" Then
                    webpageelement.InvokeMember("click")
                End If
            Next
        End Sub

    but nothing happens when you press it

    Senin, 16 Juli 2018 18.45

Semua Balasan

  • You need to use the developer API for interacting with YouTube.  Automating the web page is against the terms of use and YouTube changes their HTML on a regular basis so anything you develop today that might work will likely break within a couple of months.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Senin, 16 Juli 2018 20.04
  • Hi

    According to your description, your issue is more related about asp.net. And this forum is discussing and asking questions about the vb.net.

    asp.net: https://forums.asp.net/

    Thank you for your understanding.

    Best regards,

    Alex


    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.

    Kamis, 26 Juli 2018 06.03
  • Hi

    According to your description, your issue is more related about asp.net. And this forum is discussing and asking questions about the vb.net.

    asp.net: https://forums.asp.net/

    Thank you for your understanding.

    Best regards,

    Alex


    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.

    No, there was nothing about ASP.Net in this... it should not have been moved to off-topic.  Look at the code:

    Dim buttonele As HtmlElementCollection = WebBrowser1.Document.All

    WebBrowser1 is a Forms control.  The OP was obviously writing a Desktop application using Windows Forms.


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Minggu, 29 Juli 2018 16.01