Previous Code Entry
Left Arrow
Create an XML Sitemap or data feed with ASP.NET using VB.NET
Current Code Entry
Next Code Entry
No Captcha ReCaptcha 2.0 with ASP.NET (VB Version)
Right Arrow
ASP.NET VB - play YouTube videos on your page
Article Entry Date: July 16,2022 @ 08:12:19 / Last Updated On: August 14,2022 @ 06:09:44
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.aspx.
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 Classic play YouTube videos on your page«
ASP.NET C# - play YouTube videos on your page«