ImageURL showing as text instead of the image

Dec 25, 2008 at 9:08 AM
I have been trying to show an image of a link from facebook using the Image tag but its only showing the text, not the image.  Here is the code involved:

default.aspx.cs:
  string result2 = q.query("SELECT pic_big FROM user WHERE uid = "123456789");
  Image6.ImageUrl = result2;

     
default.aspx:
  <asp:Image ID="Image6" runat="server" />


What it is showing on the page is the link of the resultset from the FQL select query.  What I want is the image.

Any help would be appreciated.  Thanks!





Jan 1, 2009 at 10:34 PM
A copy/paste of exactly what your getting may help, the only thing that immediately springs to mind is that your  passing your result unquoted.

Try something along the lines of:

Image6.ImageUrl = "" + result2 + "";
Developer
Jan 7, 2009 at 2:46 AM
If it's showing a resultset, then I'm guessing you probably have more than just a URL in result2. I'm not sure off-hand what format the results come back in, but you'll probably need to find a way to extract the URL from your result set.

If that doesn't work, or you need more help, could you post the exact text that's getting shown on the page? Feel free to wipe out user IDs and any other personal info - it'd just help to see the overall format.
Jan 12, 2009 at 7:48 PM
Query return result as follow, and you havo to extract url info.

<?xml version="1.0" encoding="UTF-8"?>
<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true">
  <user>
    <pic_big>http://profile.ak.facebook.com/v222/888/222/n11111111_8888.jpg</pic_big>
  </user>
</fql_query_response>