none
PictureThumbnailURL not working :(

    Question

  • I'm using the following query to get my custom results

     

    SELECT PictureThumbnailURL, Title, URL, HitHighlightedSummary, ...

    FROM SCOPE()

    WHERE ....

     

    PictureThumbnailURL always returns a NULL. What property do I need to use to get document icon urls ?

     

    Thanks,

    Thursday, August 23, 2007 2:00 PM

Answers

  • string fileName = SPUtility.GetUrlFileName(<<url of the item for which you want to get the file icon>>);
    Image fileIcon = new Image();
    fileIcon.ImageUrl = "/_layouts/images/" + SPUtility.MapToIcon(SPContext.Current.Web, fileName, "");


    Hope it helps


    Monday, December 3, 2007 1:06 PM

All replies

  • I solved this problem Smile using -

     

    SPUtility.GetUrlFileName(...)

    SPUtility.MapToIcon(...)

     

    Friday, August 24, 2007 9:53 AM
  • Hi,

    Can you plse explain me in detail how did you get the PictureThumbnailURL working as i too am facing the same problem.
    How did you use those two methods of SPUtility to make it work.
    Please iam badly in need of it.

    Paddy
    Tuesday, November 20, 2007 9:38 PM
  • string fileName = SPUtility.GetUrlFileName(<<url of the item for which you want to get the file icon>>);
    Image fileIcon = new Image();
    fileIcon.ImageUrl = "/_layouts/images/" + SPUtility.MapToIcon(SPContext.Current.Web, fileName, "");


    Hope it helps


    Monday, December 3, 2007 1:06 PM
  • How would you put that into a datagrid along with the other results from the FullTextSqlQuery class query?
    Friday, July 9, 2010 7:35 PM