Click here to Skip to main content
13,147,183 members (26,475 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Please any one help me sir

[edit]Spurious bold, txtspeak and capitalization removed - OriginalGriff[/edit]
Posted 9-Apr-12 21:10pm
Updated 9-Apr-12 21:27pm
v2
Comments
Uma Shankar Patel 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
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

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#
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
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
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web03 | 2.8.170915.1 | Last Updated 10 Apr 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100