Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please any one help me sir

[edit]Spurious bold, txtspeak and capitalization removed - OriginalGriff[/edit]
Posted
Updated 9-Apr-12 21:27pm
v2
Comments
uspatel 10-Apr-12 3:34am    
dou you want to play video from youtube in your website?
venkibadduri 29-May-12 23:12pm    
Hi,I need to play videos from my using asp.net and vb.net,Please help me to get this one.Thanking You in Advance.

venki

venkibaddugri@gmail.com

Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave 145 million hits: https://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=embed+youtube+video+in+website[^]

Unsurprisingly, the top link was to YouTube telling you how to do it...
http://www.youtube.com/youtubeonyoursite[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.
 
Share this answer
 
Have you tried Google[^] ever? I must tell you it's a fantastic invention.

Check the link. You can modify your search criteria and be more specific by adding keywords like youtube etc.
 
Share this answer
 
v2
Create a div on the page, assign an id to div say "divContent" and set the div property runat="server" using source view
then add this code at page load in code behind

Using C#
C#
divCantent.InnerHtml = @"<iframe width="425" height="349" src="http://www.youtube.com/embed/" + <b><u>VIDEO_ID</u></b> + @"?hl=en&fs=1">
frameborder='0' allowfullscreframe>";</iframe>


Using VB.Net
VB
divCantent.InnerHtml = @"<iframe width="425" height="349" src="http://www.youtube.com/embed/" + <b><u>VIDEO_ID</u></b> + @"?hl=en&fs=1">
frameborder='0' allowfullscreen></iframe>"


at the place of VIDEO_ID you have to put the you tube video id
you can add using any variable, direct value or by reading querystring as you think better
 
Share this answer
 

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