In
this article I am going to explain how to play YouTube video using video url in
asp.net web application
Description:
In
the previous articles I have explained How to fill Country, State and Citydropdown list using linq to sql and how to set the video autoplay and disablethe related video option.
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