Showing posts with label Youtube. Show all posts
Showing posts with label Youtube. Show all posts

Monday, October 19, 2015

Save Youtube video into database and display using Linq

In this article I am going to explain how to save the youtube into database and display it in Gridview using Linq

Description:

I have got a requirement to save the youtube video url into database and display them where user can play the videos.

Implementation:
I have created a table Tb_videos which store the information video tile, description and URL.

Save Youtube video into database and display using Linq

HTML Markup
:

Wednesday, October 14, 2015

Play Youtube video using video url in Asp.net

In this article I am going to explain how to play YouTube video using video url in asp.net web application

Description:

I want to play the youtube video in asp.net application. To play the video the simply enter the particular youtube video url.

Implementation:
Add a webform to asp.net application. Add the below given HTML markup to webform.

HTML Markup:
<table>
   <tr>
   <td>Enter Youtube Video URL :</td>
   <td> <asp:TextBox ID="txturl" runat="server" Width="450px"></asp:TextBox></td>
   <td> <asp:Button ID="btnsubmit"
            runat="server" Text="Play"/></td>
   </tr>
   <tr>
   <td colspan="3" id="video" runat="server"></td>
   </tr>
   </table>

On button click write the below given code

Friday, October 2, 2015

Youtube: autoplay and disable related videos

In this article today I am going to explain how to set the video autoplay and disable the related video option.

Description:

I have embed a video https://www.youtube.com/watch?v=vOncd4pEErw in asp.net application. I want this video be auto play means when page load it start playing and want to hide the related video option.

Implementation:

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

Youtube: autoplay and disable related videos

There options are available Share, Embed and email. You have to choose the 2nd one (Embed), click on it. 
Youtube: autoplay and disable related videos

Below textbox you see option Show more, click on it and uncheck the “Show suggested videos when the video finishes” option.

Youtube: autoplay and disable related videos


You see an iframe code in textbox. Copy it and paste where you want to display the Youtube Video.

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: