Thursday, October 1, 2015

Asp.net: Embed Youtube video

In this article today I am going to explain how to embed Youtube video in asp.net application

Description:

I want to embed the https://www.youtube.com/watch?v=vOncd4pEErw video in asp.net application.

Implementation:
To embed the video go to Youtube video URL and scroll down. You see the share option below the video title, click on it.

Asp.net: Embed Youtube video

There options are available Share, Embed and email. You have to choose the 2nd one (Embed), click on it. You see an iframe code in textbox. Copy it and paste where you want to display the Youtube Video.
Asp.net: Embed Youtube video


Example:
HTML Markup of webform:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <iframe width="560" height="315" src="https://www.youtube.com/embed/vOncd4pEErw" frameborder="0" allowfullscreen></iframe>
    </div>
    </form>
</body>
</html>

Save the webform.Run it and check the result.

    In this article we have learn to how to embed the youtube video in asp.net applicationI hope you enjoyed this article.

No comments:

Post a Comment