Hi
I have below code . In addition to this i want to get Video Url & Video in repeater
using (var yt = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = "xyz",
}))
{
StringBuilder htmlTable = new StringBuilder();
var searchRequest = yt.Search.List("snippet");
searchRequest.ChannelId = "xyz";
var searchResponse = searchRequest.Execute();
var objResult = searchResponse.Items.ToList();
if (objResult != null)
{
htmlTable.Append("");
htmlTable.Append("Title Description Published ");
htmlTable.Append("");
foreach (var colum in objResult)
{
htmlTable.Append("");
htmlTable.Append("" + colum.Snippet.ChannelTitle + " ");
htmlTable.Append("" + colum.Snippet.Title + " ");
htmlTable.Append("" + colum.Snippet.Description + " ");
htmlTable.Append("" + colum.Snippet.PublishedAt + " ");
htmlTable.Append(" ");
}
htmlTable.Append("");
htmlTable.Append("
");
PlaceHolderTable.Controls.Add(new Literal { Text = htmlTable.ToString() });
}
}
Thanks
Amit MohantyPosted Dec 12, 2022, 7:12 AM
Check this
Ramco RamcoPosted Dec 12, 2022, 6:59 AM
Hi Amit
Instead of displaying Link it should display Url as Link.
Thanks
Amit MohantyPosted Dec 12, 2022, 6:53 AM
thy this
Ramco RamcoPosted Dec 12, 2022, 6:32 AM
Hi Amit
It is not showing .resourceId. Secondly i want to display it as a link
Thanks
Amit MohantyPosted Dec 12, 2022, 6:25 AM
For video url try this