Skip to main content


Showing posts from August, 2009

SharePoint calendar and how to export it to iCalendar format

There is an article - Understanding the SharePoint calendar and how to export it to iCal format which explains how to export the stuff to iCalendar format from SharePoint.

There is also a tool promoted there called iCal Exporter which exported the calendar for me in iCalendar format, but when I imported this iCal file to my Outlook it wasn't imported properly... :)

Forms Authentication in SharePoint

Maintaining Control Focus on Postback in ASP .NET

I have recently got an issue with massive ASP .NET Web Form which is needed for a lot of details to be entered and takes several screens to display. When you edited something in the middle of the form and initiate a postback - the form was displayed from the top.

In my case Web Form was a part of custom Web Control which is rendered within the SmartPart for SharePoint.

I found the following article which helped me - How to implement the smart navigation features in ASP.NET 2.0.

I put the following instruction in the OnInit event handler for my Web Control:

this.Page.MaintainScrollPositionOnPostBack = true;

It helped! Now when I do something on postback my Web Control scrolls back to the place I edited last. Simple but powerful.

Search Results Customization - part 2

Search Results Look-and-feel Customization.

We started using our mighty Expense Claim form and decided that we will use custom search scope to simplify administration of expense claims. Using search helps us output expense claims where necessary and will help us present expense claims information in the appropriate manner. For example like the following:

We need to output employee name, department, claim amount and total amount of all claims we find.

Customize Search Core Results output. There is one note: in this scenario we will modify search results output for the page which is used only for selected search scope. If the idea is to customize common search results page the solution is to use conditional output in XSL.

1. We have to edit search core results XSL. Go to Site Actions -> Edit Page -> Search Core Results Web Part -> Modify Shared Web Part -> XSL Editor:

2. In the Text Entry copy all text and paste it into the XML editor:

3. In the XML editor …

Search Results Customization - part 1


We want to output search results in the format which is different from standard.

Customize search results. The easiest way to do that is to customize the output provided by Search Core Results Web part.
First part of the solution is to define the output properties and second part is to customize look-and-feel.

1. Manage output properties.

Go to your search results page -> Site Actions -> Edit Page -> Search Core Results Web Part -> Modify Shared Web Part:

In the Results Query Options section select Selected Columns button:

Copy text from the appeared Text Entry dialog into the proper XML editor. I will use Visual Studio 2008. In the Columns element create child Column elements for each property you want to output specifying the Name attribute appropriately. Name attribute should be equal to the name of a relevantmanaged property:

Copy text from the XML editor and paste it back into the Text Entry dialog. Press OK button and then press OK button to save We…

Hide View All Site Content Link

We need to hide View All Site Content link for all site users except for people who have Manage Web permissions. Many of my clients wants this to be done, because when users have access to the Web site they usually see this link.

Apply security trimming for this link. I have found the following article Hide the "View All Site Content" Quick Launch Link which is exactly what I needed.

That's the flow:

1. Open SharePoint Designer -> open the Web site you want to edit -> browse to the master page you want edit -> open Design mode of the master page and select the control which displays View All Site Content link:

It's an SPSecurityTrimmedControl.

2. Change your current mode to Code:

3. In the code view you should see the selected code for this control:

4. Change the PermissionsString attribute value to "ManageWeb":

5. Save, check in and approve your master page if necessary and enjoy.

If you have any questions in regard to SharePoint…

Custom Managed Properties and Metadata Property Mappings

We would like to expose additional information on the search results page and to be able to search using specific properties.

Set up custom metadata property mappings for search.

I will use the form library described here and custom search page described here.

1. Go to Shared Service Provider Settings -> Search Settings -> Metadata Property Mappings and click New Managed Property button:

2. Provide name for managed property, specify that you will provide mappings to crawled properties and tick the checkbox that you will use this mapping in scopes. I will use Business Purpose column from the my Expense Claims form library therefore I will call my managed property "VG Business Purpose". Click "Add Mapping" button:

3. In the Crawled Property Selection dialog select SharePoint category and browse for the desired metadata crawled property. Usually the crawled property name has the following format: "ows_ColumnInternalName". In column in…

Custom Search Scope

We want to expose some SharePoint data as a directed output for the search. Users will be able to search that data specifically.

Create a custom search scope.

1. Go to Shared Service Provider settings -> Search Settings -> Scopes section. Click View scopes link:

2. Click New Scope button from the actions menu:

3. Provide name and search results page for the new search scope. In my case it is "Expense Claims" and "/Pages/customsearchresults.aspx" respectively - I will use the forms library created in this post and search results page created in that post:

4. In the Search scopes list click Add rules link for the newly created scope:

5. In the Scope Rule Type section select Web Address option, in Web Address section select Folder option and provide folder URL - in my case it is "http://your_server_name/Expense%20Claims" - and press OK button:

6. At this stage your new search scope will be empty and you have to wait some time until it will be …