given a youtube url, how can i embed the video into a page using .net c#?
To embed a video in an HTML page, use the <iframe> element. The source attribute included the video URL. For the dimensions of the video player, set the width and height of the video appropriately. The Video URL is the video embed link.
In most cases, you'll want to embed videos. Embedding videos help improve video SEO and the searchability of your video content. But there's no harm in occasionally linking videos, especially for external content.
Embedded links are a link that uses anchor text to create a link to another web page using the HTTP protocol. You can also embed a link in an image or create a link that will be opened in another application, like an e-mail client.
Simply add in a line like the following
<iframe type="text/html" width="640" height="385" src="http://www.youtube.com/embed/[VIDEO_ID]?autoplay=1" frameborder="0">
</iframe>
With the autoplay= set as you like to either 0 or 1 (depending on whether you want people to actually stay on your page or not :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With