Last post Aug 17, 2015 04:55 AM by vids2014
Aug 14, 2015 10:58 AM|vids2014|LINK
Iam working on youtube api v3 to display all the video.
With the new youtube api v3 I got the data in json form then with Deserialize it is converted to c# object.
Now my next challenge is to display the data of the C# object in html page.
I have the above line in the code and the video has all the youtube video details. Now I would like to get the video title which i can access string videotitle = video.items.snippet.resourceId.videoId; but if I try to print this in the html with <%
= videotitle %> it says The name 'videotitle' does not exist in the current context.
What is the issue here? Or how will i print video title and url in html?
Aug 14, 2015 05:00 PM|AZMatt|LINK
Are you trying to use this on a page with an .htm or .html file extension, or does it have an .aspx extension? A regular HTML page is not going to work, you need an ASP.Net markup page.
Aug 17, 2015 04:55 AM|vids2014|LINK
Yes, I have all my logic in code behind and trying to display the object in aspx page.
In video variable i have the details of youtube video. I need to print that in the aspx page. Any idea how do i do? IF i try to put the object variable in <% video.items.snippet.title %> it doesn't work. But in code behind i have all the values.