Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm working on a Custom webpart and would like to show icons for the extensions. This is on a Sharepoint Designer 2010. Also if i have extensions like .wav how can i show or add a custome icon. Thanks in advance

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

You can change File association icons globally by following steps described here:

Changing File Associations Icons in SharePoint 2010

Basic steps are:

  1. Upload icon file to SP (\14\TEMPLATE\IMAGES)
  2. Locate DocIcon.xml (\14\TEMPLATE\XML)
  3. Add <Mapping Key=”[YOUR EXTENSION]” Value=”[ICON FILE]”/> (eg. <Mapping Key=”pdf” Value=”icpdf.gif”/>)
  4. Make iisreset
share|improve this answer
add comment

If it's custom code then you can use SPUtility.MapToIcon to get the name of the icon in "/_layouts/images/"

If it's a view then just add the column DocIcon

For adding new images see the answer by @Vedran

share|improve this answer
    
Thanks guys I was after showing the icons in a custom webpart. Using the ddwrt funstion worked. –  naijacoder Apr 12 '12 at 6:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.