November 2011
Sorting the QuickLaunch programatically
try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
//Getting the SPWeb object
using (SPSite siteCollection = new SPSite("your site address"))
{
using (SPWeb rootWeb = siteCollection.OpenWeb())
{
string resourceFile = "core";
rootWeb.AllowUnsafeUpdates = true;
//Retrieving the name from the Resources file
string source = "$Resources:category_Lists";
string category_Lists = SPUtility.GetLocalizedString(source, resourceFile, rootWeb.Language);
//Getting the collection of nodes of the QuickLaunch
SPNavigationNodeCollection nodeCol = rootWeb.Navigation.QuickLaunch;
for (int k = nodeCol.Count - 1; k >= 0; k--)
{
SPNavigationNode navNode = nodeCol[k];
//TO Check if the node is of LISTS
if (String.Equals(navNode.Title, category_Lists, StringComparison.OrdinalIgnoreCase))
{
SPNavigationNodeCollection navNodeChildColl = navNode.Children;
for (int i = 0; i < navNodeChildColl.Count; i++)
{
if (!(i == (navNodeChildColl.Count - 1)))
{
for (int j = navNodeChildColl.Count; j > i; j--)
{
if (!(j == (navNodeChildColl.Count)))
{
if (navNodeChildColl[i].Title.CompareTo(navNodeChildColl[j].Title) > 0)
{
navNodeChildColl[i].Move(navNodeChildColl, navNodeChildColl[j]);
rootWeb.Update();
}
}
}
}
}
}
}
rootWeb.Update();
rootWeb.AllowUnsafeUpdates = false;
}
}
});
}
catch { }
==========
configure outgoing email settings in SP2010 to test locally mail sending functionality.
Refer the below article to configure outgoing email settings in SP2010. This can be used to test the mail functionality as some of Unilever webparts/solutions are internally relying on email functionality.
https://technet.microsoft.com/en-us/library/cc263462.aspx
===================
ULS Logging in sharepoint 2010
Method: SPDiagnosticsService.Local.WriteTrace();
Namespace: Microsoft.SharePoint.Administration.DLL
Usage: SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory("My Category", TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, ex.Message);
Reference: https://blog.mastykarz.nl/logging-uls-sharepoint-2010/
=======================
All the features and the corresponding GUID’s in SharePoint 2010 are listed in the following site.
https://blogs.msdn.com/b/mcsnoiwb/archive/2010/01/07/features-and-their-guid-s-in-sp2010.aspx
============================
Managing Large Lists
Here is something to share about Managing Large Lists a new feature available in Sharepoint 2010.
As you know sharepoint lists can store numerous list items but retriving them is very expensive. To manage this we have got List Throttling mechanism in 2010.
Look at this article for more infomation.