Click here to Skip to main content
16,020,633 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I Want to play 6 different youtube videos on my website, i want the video to open in a pop up when i click on any of the 6 link
Posted
Updated 20-Jan-12 22:20pm
v2
Comments
Sergey Alexandrovich Kryukov 21-Jan-12 4:41am    
Why it seems to be a problem? embedding of youtube video is explained in each youtube video, popup makes no difference...
--SA

1 solution

You can Use This Code

XML
<ajaxtoolkit:modalpopupextender ID="modal1"
           TargetControlID="hiddenTargetControlForModalPopup" PopupControlID="Panel1" CancelControlID="Button1"
           runat="server" BehaviorID="bhvModel1" RepositionMode="RepositionOnWindowScroll"></ajaxtoolkit:modalpopupextender>
   <asp:Panel ID="Panel1" runat="server" Height="400px" Width="497px"
       CssClass="roundedPanel">
   <div class="style59" style="text-align: right">
   <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Close"
           BackColor="#FFFFCC" BorderStyle="None"  Width="63px" /></div>

   <embed id='embed1' runat="server" name='mediaPlayer' type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'  displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='500' height='405'  designtimesp='5311' loop='false'>


  </embed>





C#
protected void Button1_Click(object sender, EventArgs e)
   {
       embed1.Attributes.Add("src", "");
       embed1.Attributes.Add("filename", "");

       embed1.Disabled = true;
       embed1.Dispose();
       this.modal1.Hide();
       this.Panel1.Dispose();

   }
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900