Sharepoint Insight by Namwar Rizvi

Sharepoint Tips, Tricks and inside knowledge from real world experience by Namwar Rizvi

Posts Tagged ‘Customization’

How to find Microsoft.SharePoint.ApplicationPages.dll and some other assemblies

Posted by namwar on June 12, 2010


You may be wondering where to find Microsoft.SharePoint.ApplicationPages.dll , if you are creating a new SharePoint application page? But don’t worry, it resides in _app_bin folder of your SharePoint site’s virtual directory.

Assuming your IIS inetpub is at C then the exact path of Microsoft.SharePoint.ApplicationPages.dll is

C:\Inetpub\wwwroot\wss\VirtualDirectories\<Your Virtual Server >\_app_bin\Microsoft.SharePoint.ApplicationPages.dll

Here is the full list of assemblies at _app_bin folder:

  1. Microsoft.Office.DocumentManagement.Pages.dll
  2. Microsoft.Office.officialfileSoap.dll
  3. Microsoft.Office.Policy.Pages.dll
  4. Microsoft.Office.SlideLibrarySoap.dll
  5. Microsoft.Office.Workflow.Pages.dll
  6. Microsoft.Office.WorkflowSoap.dll
  7. Microsoft.SharePoint.ApplicationPages.dll
  8. STSSOAP.DLL
Advertisements

Posted in Information, Object Model, Tips, Troubleshooting | Tagged: , , , , | Leave a Comment »

List of all possible Content Place Holders of SharePoint

Posted by namwar on December 21, 2009


For a handy reference I am listing all possible Content Place Holders in SharePoint pages. This list is obtained from here

Content placeholder Description
PlaceHolderBodyAreaClass Additional body styles in the page header
PlaceHolderBodyLeftBorder Border element for the main page body
PlaceHolderBodyRightMargin Right margin of the main page body
PlaceHolderCalendarNavigator Shows a date-picker for navigating in a calendar when a calendar is visible on the page
PlaceHolderFormDigest The “form digest” security control
PlaceHolderGlobalNavigation The global navigation breadcrumb
PlaceHolderHorizontalNav Top navigation menu for the page
PlaceHolderLeftActions Bottom of the left navigation area
PlaceHolderLeftNavBar Left navigation area
PlaceHolderLeftNavBarBorder Border element on the left navigation bar
PlaceHolderLeftNavBarDataSource Data source for the left navigation menu
PlaceHolderLeftNavBarTop Top of the left navigation area
PlaceHolderMain Main content of the page
PlaceHolderMiniConsole A place to show page-level commands, for example, WIKI commands such as Edit Page, History, and Incoming Links
PlaceHolderNavSpacer The width of the left navigation area
PlaceHolderPageDescription Description of the page contents
PlaceHolderPageImage Page icon in the upper-left area of the page
PlaceHolderSearchArea Search box area
PlaceHolderSiteName Site name
PlaceHolderTitleAreaClass Additional styles in the page header
PlaceHolderTitleAreaSeparator Shows shadows for the title area
PlaceHolderTitleBreadcrumb Main content breadcrumb area
PlaceHolderPageTitleInTitleArea Page title shown immediately below the breadcrumbs
PlaceHolderTitleLeftBorder Left border of the title area
PlaceHolderTitleRightMargin Right margin of the title area
PlaceHolderTopNavBar Top navigation area
PlaceHolderUtilityContent Extra content at the bottom of the page
SPNavigation Empty by default in Windows SharePoint Services 3.0. Can be used for additional page editing controls.
WSSDesignConsole The page editing controls when the page is in Edit Page mode (in the browser, click Site Actions, and then click Edit Page)

UPDATE: An excellent visual reference to above mentioned Content Place Holders can be found here

Posted in Customization, Tips | Tagged: | Leave a Comment »

Displaying only Year in SharePoint Calculated Column

Posted by namwar on November 26, 2009


I wanted to display just the year of a DateTime column of SharePoint. I created a calculated column and set the formula to Year([MyDateTimeColumn]). The result I got was 2,009 ; 2,008 etc. which offcourse incorrect for year. After searching through internet, I found a good article solved my problem.

The correct formula is TEXT(YEAR([MyDateTimeColumn]),”000″)


Posted in Architecture, Customization, Solutions, Tips | Tagged: , , , | Leave a Comment »

Custom Edit Form for SharePoint Lists

Posted by namwar on October 21, 2009


If you want to set a custom edit form to your Sharepoint List then please make sure you follow these Golden Rules as correctly suggested by Hugo in a SharePoint news group.

  1. NEVER delete or rename the default pages…
    when you want to create a new EditForm.aspx it’s best to copy it to
    another file and then edit the original one (without renaming it and
    without reassigning the supporting files)…
  2. DON’T ever delete the webparts that exist.
    It’s better to hide them and create new ones “side-by-side”.

These rules are real time savers and I will highly encourage every reader to follow them.

Posted in Customization, Errors, Tips | Tagged: , , , | 1 Comment »

Access Denied while changing name of a Document of Document Library

Posted by namwar on June 21, 2009


It is natural to assume that if you have Modify permission on any SharePoint item/document then it means you can update any property of that document, right? Wrong! You can update any property of a document/item except Name property. This is because in SharePoint terms, changing the name of the document means two things:

  1. Creating a copy of the current document with the new name and
  2. Deleteing the current document.

If you don’t have Delete permission and just have Modify permission then you can modify every property except the Name property.

So, if you are getting Access Denied error while changing the Name of a document of a SharePoint Documnt Library and you know that you have the Update/Modify permission on that doucment then make sure you also have Delete permission on that document.

Posted in Configuration, Guidance | Tagged: , | Leave a Comment »

Microsoft SharePoint Designer is now Free !

Posted by namwar on April 7, 2009


SharePoint Designer Team at Microsoft has announced at its blog here that Anyone can use SharePoint Designer as a free tool. This is really a step in right direction and will help SharePoint community to build better user experiences. 

You can download the SharePoint Designer from here

Posted in Customization, Tools | Tagged: , , , , | Leave a Comment »

Ten Themes for SharePoint in VSeWSS Projects

Posted by namwar on March 25, 2009


Ten new SharePoint themes have been released by Microsoft to help SharePoint designers to make new sites more efficientlty. You will find them as individual  Visual Studio 2008 projects which when deployed to SharePoint offer fresh new designed themes you can use in your projects. 

Themes can be downloaded from here

Following is a preview image of these themes (from Sharepoint.microsoft.com)

Posted in Guidance, Templates | Tagged: , , , , | 2 Comments »

Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.3 – Mar 2009 CTP

Posted by namwar on March 24, 2009


A goow news for SharePoint community 🙂 Microsoft has releasesd the Mar 2009 CTP of Windows SharePoint Services 3.0 v1.3. This CTP contains excellent set of functionalities and saves your precious time. You can download the extensions from here

Following is the overview as released by Microsoft

This is the SharePoint developer tools for Visual Studio 2008. These tools are suitable for use with Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007. It includes project and item templates for common SharePoint artifacts, it includes build, packaging and deployment for SharePoint solutions and it includes the SharePoint Solution Generator which creates a new Visual Studio 2008 project from a SharePoint site.

The tools provide item templates for List Definition, List Definition from Content Type, Content Type, Field Control, Web Part, Module, Root File, Template, Event Receiver, and List Instance. It provides project templates for Team Site Definition, Blank Site Definition, List Definition, Web Part and Empty. It works with Visual Basic .NET and C# languages and a comprehensive user guide is included. It does not include the SharePoint Workflow templates as they are built in with Visual Studio 2008.

New features in version 1.3 include:

  • Can be installed on x64 Server OS machines running SharePoint x64. Previously only x86 Server OS could be used
  • Separate build commands for package, deploy and retract are added as Visual Studio menu items
  • WSP View improvements for consistency of deleting feature elements, merging features and adding event receivers to features
  • Command line build, package and retract commands are included enabling continuous integration and build servers. Previously command line build of SharePoint projects was very difficult
  • Refactoring support for renaming of Web Parts. Previously renaming a web part required changes in several files in the project
  • Solution Generator can now generate solutions from publishing sites. Previously only regular sites could be generated
  • Allowing partial trust BIN deployments of web parts
  • New project item template for SharePoint RootFiles items
  • Deployment will now optionally remove conflicting existing features on the development server prior to redeployment. Previously any feature name conflicts would result in an error
  • Ancillary assemblies such as for business logic can now be added to the SharePoint Solution WSP
  • Hidden features related to Site Definition projects are now shown in WSP View. They are no longer hidden
  • For advanced users a fast deploy is included to update only the compiled assembly on the SharePoint development installation
  • Deployment step logging is included
  • The List Definition from Content Type template now allows for the creation of a List Definition Event Receiver
  • The User Guide is now installed with the extensions instead of being a separate download

Posted in Debugging, Guidance, Templates, Tools | Tagged: , , , , , , , , | Leave a Comment »

Launch Office Application from SharePoint Portal Page

Posted by namwar on February 26, 2009


Business Problem:

    One of my client wanted to have links on main portal to launch Microsoft Office key applications i.e Word, Excel, Power Point and Outlook directly by clicking on a link at portal page.

Solution:

I searched the net and find a nice solution here It is a small piece of JavaScript code which you can put in CEWP and use it on your portal page. I added some formatting and relevant icons against the office applications and wraps it up in a webpart dwp file. After importing this web part on your page, you will get something like this:

launchofficeapplication1

You can download the dwp file from here

Posted in Customization, JavaScript, Uncategorized | Tagged: , , , , | 3 Comments »

How to fix Cannot run Windows SharePoint Services on this page?

Posted by namwar on February 3, 2009


If you are getting “Cannot run Windows SharePoint Services on this page…” error while trying to upload multiple files in Sharepoint and you are banging your head against the wall then don’t worry you are not alone 🙂 It is the shared pain by many of us facing the legacy errors of FrontPage Server extensions in Sharepoint. This error occurs if you modify Upload.aspx located in layouts folder. First and foremost, do not modify the standard upload.aspx or any other standard file in Sharepoint as it is not supported by Microsoft and your change will be overwritten by any new service pack or hot fix.

So having said that, if you have made a copy of upload.aspx, customized it and trying to use it then you may certainly face this error. Following is the solution to fix it:

  1. Open your copy of upload.aspx and search for 
    <input TYPE="hidden" NAME="_charset_" VALUE="utf-8"><!--webbot bot="FileUpload" endspan i-checksum="45034" -->
  2. Update the following string as follows
    <input TYPE="hidden" NAME="Cmd" VALUE="Save"><!--webbot bot="FileUpload" endspan  -->
  3. Save your file.
  4. Reset IIS
  5. Try to use the file in Sharepoint and Bingo!!!! no more error :):):)

Posted in Uncategorized | Tagged: , , , , | 9 Comments »