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 developing lots of web parts and of course i'm doing this all locally then uploading to the live online SP2010.

I'm needing to write a lot of extra code to accommodate the file paths of images and CSS files etc and its becoming a bit of a headache, has anyone else ran into this? Any tips or solutions to reduce the number of If then else?!

TIA.

S

share|improve this question
    
Can you give examples of that you need to change and why are the paths different in your local environment? –  Per Jakobsen Oct 15 '12 at 16:40

1 Answer 1

where are you deploying images and CSS files? is it in some doc lib of the site itself, or in layout folder, if you deploy them in layout folder then you should not run into this problem, just refer your resource with virtual path like "/_layouts/YourFolderName/resource" but for some reason if your files has to be in site's library then I guess you will face some problem if you dont know the library name or library structure at the time of development.

share|improve this answer

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.