flickr.PhotosetsGetPhotos problem

Topics: Developer Forum
Sep 19, 2010 at 12:25 PM


I am trying to get photo's from a flickr set in vb but i get an error :  " Value of type 'FlickrNet.PhotosetPhotoCollection' cannot be converted to '1-dimensional array of FlickrNet.Photo " (3.1b2)
can someone help me out ?
thanks !


Imports FlickrNet
Partial Class getphotofromset
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim ApiKey = "myapikey"
        Dim SharedSecret = "mysharedsecret"
        Dim AuthToken = "myauthtoken"

        Dim flickr As New Flickr(ApiKey, SharedSecret, AuthToken) 

        Dim photos As Photo() = flickr.PhotosetsGetPhotos("72157624894734736") '<-  Value of type 'FlickrNet.PhotosetPhotoCollection' cannot be converted to '1-dimensional array of FlickrNet.Photo

        rptPhotos.DataSource = photos

    End Sub
End Class


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="getphoto.aspx.vb" Inherits="getphotofromset" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
    <ASP:LABEL id=lblAlbumTitle runat="server"></ASP:LABEL>
<ASP:LABEL id=lblAlbumDescription runat="server"></ASP:LABEL>
<ASP:REPEATER id=rptPhotos runat="server">        
     <ASP:IMAGEBUTTON id=imgPhoto runat="server" ImageUrl='<%# Eval("ThumbnailUrl") %>' ToolTip='<%# Eval("Title") %>'></ASP:IMAGEBUTTON>




Sep 30, 2010 at 7:20 AM

nobody ?

Oct 1, 2010 at 4:52 PM
Just do this instead:

Dim photos As PhotosetPhotoCollection =

The PhotosetPhotoCollection class inherits from Collection(Of Photo)
so can be used directly for data binding or looping in a For Each
statement without needing to convert to an array of Photo instances.

Oct 1, 2010 at 5:23 PM
Thanks Sam ! I Will try.