Home
About
Contact
Categories
Classic ASP (32 - Entries)
CSS (1 - Entry)
JavaScript (5 - Entries)
Databases (30 - Entries)
ASP.NET (26 - Entries)
Delphi (6 - Entries)
Windows Server Core (13 - Entries)
VMWare (1 - Entry)
Code Editing Tools (2 - Entries)
Linux (4 - Entries)
Dell Servers (15 - Entries)
Design and Editing Software (1 - Entry)
Blog Entries
2025 (3 - Entries)
Bug Reports
(Bugs Fixed
CFFCS Coding Source
Please report any errors to the [
Contact
] page. Thank you.
Classic ASP (32)
CSS (1)
JavaScript (5)
Databases (30)
ASP.NET (26)
Delphi (6)
Windows Server Core (13)
VMWare (1)
Code Editing Tools (2)
Linux (4)
Dell Servers (15)
Design and Editing Software (1)
Tools
Format Your SQL Script
Minify your CSS
Resources
[View The Source Code For This Project]
ASP.NET
C#
ASP.NET C# - play YouTube videos on your page
Live Editing Disabled for Server-Side Example
HTML
Load.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Load.aspx.cs" Inherits="Load" %>
YouTube ID
<% // Create our variable String strYouTube = Request.Form["YouTube"]; String UTube; // Next we call our variable and query it against the value of the input if (strYouTube != null && strYouTube != string.Empty) { UTube = Request.Form["YouTube"].Trim(); UTube = UTube.Replace("\'", "\'"); %>
<%}%>
CSS
Load.css
#YTBut { border-radius: 10%; width: 25%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; resize: vertical; } #YTField{ border-radius: 10%; width: 25%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; resize: vertical; }
ASP.NET
Load.aspx.cs
using System; public partial class Load : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { String getYT = Request.Form["YouTube"]; if (getYT != null && getYT != string.Empty) { IDLabel.Text = "If ID is correct, Your video will Load below."; } else { IDLabel.Text = "Enter a YouTube Video ID, then press the button =>"; } } protected void YTBut_Click(object sender, EventArgs e) { ShowYT.Visible = true; } }
Preview
Tags
play YouTube videos on your site
play YouTube videos on your site
play YouTube videos on your site
ASP.NET C# play YouTube videos on your site