I would like to know how to display a local image in my SharePoint 2010 Web Part. I don't really know which url to write in the css.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Add SharePoint "Images" mapped folder to the project in Visual Studio.
Create a
WEB-PART-NAME
folder inside (to keep related images together and not overwrite some other image by accident).Place the image in this folder.
Use the following URL:
/_layouts/images/WEB-PART-NAME/IMAGE-FILENAME.png