using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data;
using System.Collections.Generic;


public partial class Admin_ManageYouTubeItems : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Utility.IsNull(Session["Admin"]))
        {
            Response.Redirect("~/Home.aspx");
        }

        dsYouTubeVideos.ConnectionString = ConfigurationManager.ConnectionStrings["SabrinContent"].ToString();
    }

    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string sql = "INSERT INTO YouTubeVideos (YouTubeID, Title) VALUES ( '"+txtYouTubeID.Text+"', '"+txtTitle.Text+"')  ";
        SqlHelper.ExecuteNonQuery(CommandType.Text, sql);
        gvYouTubeLinks.DataBind();
    }
}
