protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.QueryString["v"])) { int numvideoswatched = (int)Application.Get("numvideoswatched"); numvideoswatched++; Application.Set("numvideoswatched", numvideoswatched); YouTube.Video vid = YouTube.Video.GetDetails(Request.QueryString["v"].ToString()); Page.Title = vid.Title + " - Video"; txtEmbed.Text = vid.EmbedHtml; txtUrl.Text = vid.YouTubeUrl; litTitle.Text = vid.Title; lblAdded.Text = vid.UploadTime.ToString(); lblDescription.Text = vid.Description; hidTags.Value = vid.Tags; relatedVideos.VideoList = YouTube.Video.GetRelatedVideoList(vid.Tags); rptTags.DataSource = vid.TagList; rptTags.DataBind(); litEmbed.Text = vid.EmbedHtml; } }
protected void Page_Load(object sender, EventArgs e) { YouTube.Video v = new YouTube.Video(); rptVids.DataSource = this.VideoList; rptVids.DataBind(); }