Click here to Skip to main content
11,715,043 members (72,600 online)
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 21:10pm
Edited 9-Apr-12 21: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 530
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 125
0 Sergey Alexandrovich Kryukov 775
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320


Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 10 Apr 2012
Copyright © CodeProject, 1999-2015
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