Posts

SharePoint 2010 Ribbon Hide or Show Options

Option1 : http://stackoverflow.com/questions/6365837/sharepoint-2010-ribbon-hide-show-on-library-item-selecting-or-other-event - based on the user pressing arrow keys, the ribbon appears, this way, they can be trained to do this within the dialog window; glitch is – they can toggle this when viewing the main site itself Option 2: http://blog.concurrency.com/sharepoint/hide-sharepoint-ribbon/ - can hide or show ribbon based on a querystring parameter, so whenever a dialog window is open – we can show the ribbon by checking IsDlg; flip side is for the admin too, ribbon will not appear and they have to go to settings page by going to _layouts/settings.aspx Option  3: http://howtosharepoint.blogspot.in/2010/06/hide-ribbon-programatically.html - hiding the ribbon programmatically in all the pages and when a dialog window or your custom page is opened, leave the ribbon as it is – this also has option to hide the site actions menu separately Option 4: http://sharepointda...

SharePoint 2010 Toggle Ribbon Visibility

http://spribbonvisibility.codeplex.com/ We can hide this ribbon, only for Anonymous Users or for a particular SP group We can also COLLAPSE the free space. But beware that the Sign In option will disappear and then the Ribbon options in the Dialogs will also not come up. Karthick

SharePoint 2010 Calculated Column Formula for Two Date Fields

=IF(AND([Date1]="",[Date2]=""),"",IF(AND(NOT([Date1]=""),[Date2]=""),TEXT([Date1],"MM/dd/yyyy"),IF(AND([Date1]="",NOT([Date2]="")),TEXT([Date2],"MM/dd/yyyy"),IF([Date1]=[Date2],TEXT([Date1],"MM/dd/yyyy"),TEXT([Date1],"MM/dd/yyyy") & " to " & TEXT([Date2],"MM/dd/yyyy")))) -------------- Scenarios this formula addresses when you have 2 date columns: When both are empty, you would not like to show anything When one is available and another is empty, you would like to show only that available date When both are available and are different, you need to show Date 1 to Date 2 When both are same, only one date must be displayed A good mix of inbuilt functions available such as IF, AND, NOT and TEXT!

IIS 7.5 - HTTP Error 500.21 Internal Server Error PageHandlerFactory-Integrated

Image
You have published a ASP.Net 4.0 Site from your dev environment to your production environment (could be Windows Vista, Windows 7 or Windows Server 2008), when you open the site, you get the below error. HTTP Error 500.21 Internal Server Error PageHandlerFactory-IntegratedThe reason is you do not have .Net Framework 4.0 installed. Follow the below steps, if it is Windows 7. 1. Enable ASP.Net in Windows 7 2. Install .Net Framework 4.0 3. Navigate to C:\Windows\Microsoft.Net\Framework64\v4.0.30319 and run aspnet_regiis -i Do an IISReset, now your site should load fine!

SharePoint Designer : This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator.

Image
You have a SharePoint 2010 Claims Authentication ( FBA ) enabled site and you have a Custom SignIn Page created. Now, if you try to open the site in SharePoint Designer 2010, you will get this error:This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator. Just change the Custom SignIn Page to Default SignIn Page and it will start working. After making the desired changes in SPD, do not forget to change it back to your Custom SignIn Page!

SqlCeException was unhandled. The operating system does not support the encryption mode provided.

Image
SqlCeException was unhandled The operating system does not support the encryption mode provided. The environment is: Windows 7 Home Premium Visual Studio 2008 .Net Framework v3.5, SQL Compact v3.5 If ever you get this message on your PocketPc project when you are opening the connection, it is most likely because your database is encrypted with a password. Just remove the password (which will decrypt the database), save it back and run your code. It should now go through fine.

SharePoint programmatically managing item permissions

Assigning SharePoint List Item level permission programmatically To add item level permission in an SharePoint List or Library, you need to keep three things in mind: You have a valid SPUser object in your hand You have to break the role assignment inheritance for the list You have to add Role Definition and Role Assignment to the targeted list item Though above statements looks complicated, don't think much about them – just use following two functions wisely and you are done :) Assumption: 1. You have SPListItem object in your hand 2. You have a valid SPUser in your hand Working: First call the below method and pass the SPListItem as the input parameter: RemoveAllPermissions Function private   static   void  RemoveAllPermissions( SPListItem  CurrentlistItem)         {              //The below function Breaks the role assignment inheritance for ...