locked
Avatar image fetch help RRS feed

  • Question

  • User-1002638002 posted

    I'm trying to extend the club starter kit and I've created members who have different work titles.  I've created a couple of very simple pages to display these members by their based on their worktitle.  What I can't seem to get is their avatar image. 

    I've generated these web forms using sqldatasource and gridviews.  What I want to do is convert this code on page_load:

    if (!member.IsAvatarSizeNull())
            {
                m_PhotoURL = "AvatarImagefetch.ashx?Memberid=" + user.ProviderUserKey.ToString();
            }
            else
            {
                m_PhotoURL = "../images/nophoto.gif";
            }
                   
      and be able to plug it into this value in the webform's gridview like this:

     <asp:Image ID="ImageThumbnail1" runat="server" ImageUrl='<%# Eval("Avatar") %>' />

    Any ideas?  Thanks!

    Wednesday, February 21, 2007 2:47 PM

All replies

  • User1498347186 posted

    You can assign value  to ImageUrl  from codebehind like this;

       Image1.ImageUrl=m_PhotoURL;
     

     

     

    Wednesday, February 21, 2007 10:50 PM