Previous Code Entry
Left Arrow
Send Email using ASP Classic and CDOSYS
Current Code Entry
Next Code Entry
ASP Classic Linkify - Convert text links into Clickable URLs
Right Arrow
ASP Classic play YouTube videos on your page
Article Entry Date: July 14,2022 @ 06:48:14 / Last Updated On: October 25,2022 @ 03:03:05
Allow your visitors to play YouTube videos on your site, brings your visitors closer to you in a way that is not typical of most websites.

Part 1:
Create a New webpage and name it: Youtube.asp.
Create a Form with a text field and a Submit button.
Set the Method of the form to [POST] and the action, set to the same page we are on.





Part 2:
Using an [IF STATEMENT] allows us to have the content on the same page and only show it when the visitor supplies a YouTube video ID.
Example: C-FGs18RCwk
And the Submit Button has been fired, with the Value of [Play YouTube Video]





Part 3:
The YouTube Object Properties.
The Video will be displayed here.
You can change the values of the width and height to the following.

width="560" height="315"
width="640" height="360"
width="853" height="480"
width="1280" height="720"
Going Higher than this can make some visitors' pages too big for their monitor.




Other Articles Related to this Entry.
ASP.NET VB - play YouTube videos on your page«
ASP.NET C# - play YouTube videos on your page«