Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8952787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:57:06+00:00 2026-06-15T13:57:06+00:00

So far I’ve been able to embed and show a Youtube video inside my

  • 0

So far I’ve been able to embed and show a Youtube video inside my winforms just fine..but I have a list of videos and I would like to be able to change the current URL to a new one, but for some reason it does not work..

WebBrowser wbYoutube = new WebBrowser();
wbYoutube.Url = new Uri("http://www.youtube.com/embed/" + datagridview1[0, e.RowIndex].Value.ToString() + "?autoplay=1");
panel1.Controls.Add(wbYoutube);

Now that works fine the first time, but when I click on the next video in my list, it doesn’t refresh that WebBrowser nor panel.

Any help is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:57:07+00:00Added an answer on June 15, 2026 at 1:57 pm

    you are adding a new webbrowser each time. possibly, the newly added webbrowser is on the panel where you can not see it.

    you should not add a new one each time.

    do something like this, remove existing webbrowser first, assume there is no other browser in that panel1:

        foreach (Control c in panel1.Controls)
    {
        if (c is WebBrowser)
        {
            panel1.Controls.Remove(c);
        }
    }
    
    WebBrowser wbYoutube = new WebBrowser();
    wbYoutube.Url = new Uri("http://www.youtube.com/embed/" + datagridview1[0, e.RowIndex].Value.ToString() + "?autoplay=1");
    panel1.Controls.Add(wbYoutube);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So far I have not been able to find an answer, but I wanted
So far I have been able to compile my Java programs in Linux using
So far I have only been updated a view from within its controller. I
So far I have been focusing on my application's programming and paid little attention
So far I have been suggesting new features to http://delphi.uservoice.com Since it is managed
So far all the sites I have made have been in PHP, I'm thinking
As far as I've been able to find out, Windows doesn't offer an API
So far, I have been storing the array in a vector and then looping
So far I have been using in tutorials, examples and sample code only packages
So far I've been setting up redirects for single pages on my ASP.NET site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.