Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Please any one help me sir
 
[edit]Spurious bold, txtspeak and capitalization removed - OriginalGriff[/edit]
Posted 9-Apr-12 22:10pm
Edited 9-Apr-12 22:27pm
v2
Comments
Uma Shankar Patel at 10-Apr-12 3:34am
   
dou you want to play video from youtube in your website?
venkibadduri at 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
0 Sergey Alexandrovich Kryukov 420
1 OriginalGriff 210
2 Kornfeld Eliyahu Peter 210
3 DamithSL 210
4 mukesh mourya 85
0 OriginalGriff 7,215
1 DamithSL 5,199
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,757
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 10 Apr 2012
Copyright © CodeProject, 1999-2014
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