Download flash web control from http://www.aspnetflash.com/ .
Just add that in to your tool box by right clicking on tool box items and clicking on choose items. If u have already added the tool then select it else browse for dll file and add that...
Now ur tool box contain flash video control that can play flv or swf files.. jus asign
Flash1.MovieURL = "Path of video file from u tube";//Here flash1 is id of flash control
This will work, if not please let me know...
I have taken a data list which displays name of video, description and link button from database..If i click on see video link that will play video in flash control
If u are using only videos from youtube but not playing any videos from ur server or anywhere else u can use following code
protected void lnkSeeVideo_Command(object sender, CommandEventArgs e)
//lnkSeeVideo_Command is event of item template(link button) that is in data list--
{
try
{
string str = Convert.ToString(e.CommandArgument);//str is video id string of a video that is in youtube --- which is fetched from database
lblVideo.Text = string.Format("<div id=\"video{0}\"><object width=\"491\" height=\"343\"><param name=\"movie\" value=\"http://www.youtube.com/v/{0}&rel=1\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/{0}&rel=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"491\" height=\"343\"></embed></object></div>", str);
///We are embedding youtube flash video at runtime in a label, this worked fine for us.
}
catch (Exception ex)
{
}
}
Naresh Y Yadav