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 am new to SharePoint, and want to discuss an issue.

I created a .ascx user control and put it on a site page "SomePage.aspx". I have a html table structure in my .ascx Control where i am showing different information. In one of the table column, I want to show an image. Now, my question is, where i store this image so that i can use it in my Control on site page ?? Can anybody tell me the complete path or url of folder to store images ??

Also the path for accessing that image ??

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You can put the images in the LAYOUTS folder in the 14 hive. (Should be at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS")

To access the images then, you can use the SharePoint mapped /_layouts/ folder.

For instance, if you put MyPic.jpg in ...\LAYOUTS\MySolutionName\MyPic.jpg you can access that image from any location within your farm at /_layouts/MySolutionName/MyPic.jpg.

share|improve this answer
    
I Think the correct path for storing images will be: (Should be at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES") Am i correct ?? –  SPBeginer Nov 20 '12 at 15:41
    
It depends entirely on how you want to package your solution. You can put them in the images mapped folder in VS, then the URL is /_layouts/images/... See sharepoint.stackexchange.com/questions/39707/… –  RJ Cuthbertson Nov 20 '12 at 16:00
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.