Click here to Skip to main content
16,004,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have tried with bellow code which directly displays video frame inside modal box

ASP.NET
<div class="links" id="link6" data-toggle="modal" data-target="#myModalvid" title="Only Show Video Posts"></div> 
                             <div class="modal fade" id="myModalvid" role="dialog">
                                <div class="modal-dialog modal-sm" >
                                  <div class="modal-content" id="Div20">
                                    <div class="modal-header">
                                      <button type="button" class="close" data-dismiss="modal">&times;</button>
                                      <h4 class="modal-title">Add Video</h4>
                                      <asp:TextBox class="form-control" ID="txtvid" runat="server" placeholder="Enter Video URL"></asp:TextBox>
                                     </div>
                                    
                                    <div class="modal-body">
                                        <iframe width="550" height="350" src="//www.youtube.com/embed/mwuPTI8AT7M?rel=0" frameborder="0"></iframe>
                                    </div>
                                    <div class="modal-footer">
                                      <button type="button" class="btn btn-primary" >Post</button>
                                      <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>                                      
                                    </div>
                                  </div>
                                </div>
                              </div>   

i not getting any idea how to implement it , when user enters Video URL in Textbox it will automatically display video in i-frame.
Posted
Comments
Sergey Alexandrovich Kryukov 26-Dec-15 2:11am    
Why iframe? How is it related to "modal". And what exactly do you mean by "modal".
—SA
Design5ud 26-Dec-15 2:23am    
it is bootstrap modal

1 solution

May be this will help you...Please refer the below link..

I didn't used your code to display modal but i had used bootstrap modal..

JS Fiddle
 
Share this answer
 
v2
Comments
Design5ud 26-Dec-15 8:18am    
thanx amit , i will try out something from ur code..

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