Browsing Tag

sharepoint

C#, SharePoint 2010

Retrieve URL from Picture and Hyperlink Column

In SharePoint lists, you have the option to provide a column for images with descriptions.  When retrieving it using SPQuery for a WebPart or other back end code, it can be confusing as the url and description are in a String format like this :  “url, description”.

A simple solution for retrieving either the URL or the description is to create a new SPFieldUrlValue object using the column returned in your SPQuery and reference the URL and Description individually.

Example:

SPFieldUrlValue imageData = new SPFieldUrlValue(item[“ImageDescFromSPQuery”].ToString(););
String justTheDescription = imageData.Description;
String justTheImageURL = imageData.Url;

SharePoint 2013, SharePoint Designer

Sharepoint: When Designer Says a File is Checked Out but it is not.

If you’ve worked with SharePoint for any appreciable amount of time, you know that SharePoint Designer sometimes tells you lies when it comes to checked out and checked in files.

SPD will show you a checked out file but when you try to edit it, it will tell you it’s not checked in and try to make you save it to your computer. There’s a simple fix for this. Navigate to your app settings and delete the cache for the SharePoint site you’re working on.

In Windows 10, the location for the items is here:

C:\Users\Sunira\AppData\Local\Microsoft\WebsiteCache

You will need to close SPD before you can delete the cache for the website you’re working on.  Saves a bunch of time and trouble!