This is a Youtube like Control i developped in C#, asp.net 3.5 for a Client . The idea was to have a control madia player like that require less code. So , pretty slick , what you need is to create a database table to hold the youtube Urls. No need to save the youtube embeded code in your DB. I provide a link demo View the Demo site
Well, not enought time to complete the article ,so i also included the full source code for you to download. If you have any issue, please contact me throught the contact form.
<div align="center" >
<
asp:ScriptManager ID="smVideo" runat="server"></asp:ScriptManager> table><tr><td><br /></td> td valign="top" ><asp:UpdatePanel ID="UpdatePanel1" runat="server" updatemode="Conditional" > <<<ContentTemplate>
Choose a video
<asp:DropDownList Width="60%" ID="cmbPlaylist" runat="server" AutoPostBack="True"> <asp:ListItem Selected="True" Value="yoFezM0pw4Y">FilsDuFaso</asp:ListItem> <asp:ListItem Value="5QlAxznkj5I">FilsDuFaso</asp:ListItem></asp:DropDownList> <br /><br /><asp:Literal ID="Literal1" runat="server"></asp:Literal>
</ContentTemplate></asp:UpdatePanel></td> <td></td></tr></table>
Copyright 2009
http://DavidZ.afriklink.com
</div>
The CS file looks like
private int width = 350;
private int height = 300;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int idex = 1;
int auto = 1;
ddlPlaylist.SelectedIndex = idex;
// generate script on page load
Literal1.Text =
ZongoVideoScript.Get(ddlPlaylist.SelectedValue, auto, width, height);
}
else
{
// generate script on page postback
Literal1.Text =
ZongoVideoScript.Get(ddlPlaylist.SelectedValue, 0, width, height);
}
View the Demo site
Download the files ZongoVideoSite.rar (17.90 kb)
View the Demo site
Download the files ZongoVideoSite.rar (17.90 kb)