Hello all,

I've seen a couple threads on this issue but I couldn't make heads or
tails of them and I am still without a solution for my issue. I
apoligize in advance for propogating any redundancy on this topic.

For test purposes, I have a .net webpage (in C#) with an image control
and a hyperlink control around it. All I am trying to do is query
picasa for an image to have the image control display the thumbnail,
and the hyperlink link to the full image. Everything works except the
url I supply to the hyperlink, which I am aquiring from
Media.Content.Attributes["url"].

Here is a sample of the code I am using:

        string username = ConfigurationManager.AppSettings
["PicasaUsername"];
        string pwd = ConfigurationManager.AppSettings["PicasaPwd"];

        PicasaService service = new PicasaService("PersonalWeb");
        service.setUserCredentials(username, pwd);

        PhotoQuery query = new PhotoQuery(PicasaQuery.CreatePicasaUri
(username));
        query.NumberToRetrieve = 1;
        query.Tags = "friends";

        PicasaFeed feed = service.Query(query);

        foreach (PicasaEntry photo in feed.Entries)
        {
            string thumbUrl = photo.Media.Thumbnails[0].Attributes
["url"].ToString();
            string fullurl = photo.Media.Content.Attributes
["url"].ToString();

            Image img = (Image)tblRecentPhotos.FindControl
("latestPhoto" + i.ToString());
            HyperLink hl = (HyperLink)tblRecentPhotos.FindControl("hl"
+ i.ToString());

            img.ImageUrl = url;
            hl.NavigateUrl = fullurl;
         }


Basically, when I load the page, the thumnail shows up in the image
and when I click on it, I am redirected to a google error page instead
of my image. How do I need to modify this code to supply the hyperlink
with a working url to the image?

Any ideas?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to