Last time one of my Clients asked me for a possibility to extend document libraries with Excel template. The choice was obvious – a custom content type with Excel document template. I have created such a content type in few minutes, created a package, run deployment process and… Voilà! Site content type has been created. (continue reading…)
Some time ago I have written the post about creating custom login page for SharePoint 2010. Many visitors asked me whether it works also for SharePoint 2013. The answer is: probably yes :). I haven’t tested it, but it should not cause any problems.
This way or another, I’ve decided to rewrite the page to be 100% SharePoint 2013 comaptibile.
At the end of this post You will find everything what’s needed to implement the solution in Your environment. Enjoy!
Everybody, who at least once created a custom event receiver, knows property EventFiringEnabled(or DisableEventFiring method in SP2007). It allows to disable event firing, so SPListItem.Update() can be safely executed, without any other event receiver come in the way.
But what, when You want to disable event firing outside Your custom event receiver? There is a very simple way to do it. (continue reading…)
Sometimes You need to add a new button to the list’s/library’s ribbon – nothing more simple than that. You jut need to create a new SharePoint project, add a feature, add an empty element with an Elements.xml file and define in it XML structure that will represent the new bottom. (continue reading…)
Fetching selected list items in SharePoint 2010 is very simple. To achieve such a functionality You can use Custom Ribbon Button. In this example I will use the code from my previous post on creating custom ribbon button. (continue reading…)
I often use NHibernate to work with SQL database. It’s a very mature ORM solution for .NET which allows You to freeley “talk” with any database. Although, this is very simple ORM, sometimes I have some challanges I have to face.
One of the first issue I had with this ORM was:
Could not load file or assembly ‘NHibernate.ByteCode.Castle’ or one of its dependencies. The system cannot find the file specified.
Developer dashboard is a new feature in SharePoint. It provides to developers and administrators performance and tracing information that can be used to debug and troubleshoot issues with a page rendering time. The dashboard is turned off by default but it can be enabled through C# code, stsadm or powershell command and it can have three states: On, Off, OnDemand. First two should be clear. Third one means that SharePoint will show an image button next to Your login name on a page with which You will be able to show or hide the developer dashboard.
Item event receivers are similar to triggers existing in databases. They are executed on certain moments(events) on a SharePoint lists, libraries etc. Thanks to the events You can control Your items content, perform necessary validation before commiting any changes to the item.
Caching content by the browsers can be sometimes very annoying. I had problems with it, mostly when I was developing some popup modal dialogs which showed aspx or ascx controls.
Thankfully, there is very simple solution how to disable content caching. You achieve it in two ways:
In the previous post I showed You how to manage roles for forms authentication. Now I’ll explain how to manage users from the code side.
The main class which lets You manage users from provider is System.WebSecurity.SqlMembershipProvider class.