August 11, 2010

Get RSS URL from SPList object

public string GetRSSUrl(SPList list)
{
string rssurl = string.Empty;
using (SPWeb web = new SPSite(list.ParentWeb.Url).OpenWeb())
{
rssurl = web.Url + "/_layouts/listfeed.aspx?list=" + list.ID;
}
return rssurl;
}



RSS feeds are generated with the help of listfeed.aspx which resides in the layouts folder. It take list id as parameter through querystring. Will be posting other overloaded methods for variants.

August 10, 2010

SharePoint 2010 Social Ratings – Part 2

In Part 1, we have seen how to use the SharePoint 2010 Social ratings in lists. In this post we will try to change the SharePoint ratings icons to custom icons.
In SharePoint 2010 classic five star has been used for the ratings, and these image path are stored in the Site properties.

August 7, 2010

Could not load type 'System.Data.Services.Providers.IDataServiceUpdateProvider'

 

I was trying to access SharePoint 2010 REST services in a Windows 7 machine, and face the below error message.

image

After some binging was able to get a Service update, which solved the issue.

ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2

Now, I’m able to proceed with the REST.

image

August 6, 2010

SharePoint 2010 Social Ratings – Part 1

SharePoint 2010 provides new feature to users to rate the site content list items like documents, blogs, tasks, discussion items etc. It’s available only with SharePoint 2010 and not with the Windows Foundation Services.

Lets see how to use the rating feature. I will use social rating on the discussion board list in this article, but the procedure remains same for the rest of the lists.

Follow the below steps to enable rating.

1. Enable Ratings Feature, It’s a hidden site feature, make sure it’s activated.