Thursday, May 26, 2011

Beauty Of Linq in Sharepoint

Linq Query to Get the ListItems for List in  One Step
Namespace:System.Linq, System.Collections.Generic    

IEnumerable results = lstMembershipList.Items.Cast().Where(item => item["EntityType"].ToString().Trim() == "Project" && item["Association"].ToString().Trim().ToUpper() == associationType

Monday, May 23, 2011

Search Architecture in Sharepoint 2010

While customizing the Search,Its very much important to understand the search Architecture

1)Create the metadata columns which gets values from Taxonomy term store
In background  Metadata property and Crawl properties are generated which requires crawl time
Now your task is to map  and index this properties for search.

2)Create the Search Scope

3)Use query object model  to query scope and to show  customize  metadata columns in grid

I will make this post more compehensive with Images and navigations . Happy Reading!!

Tuesday, May 17, 2011

Sharepoint 2010 Enhanced Event receivers

Following  event is called when site collection is created
public class EventReceiver1 :SPWebProvisioningProvider

public override void Provision(SPWebProvisioningProperties props)


throw new NotImplementedException();



Following event is called when subsite is created

public class EventReceiver2 : SPWebEventReceiver

public override void WebAdding(SPWebEventProperties properties)




Sunday, May 15, 2011

Understand the feelings of TFS which is integrated with Sharepoint Project in VS2010 :)

There are lot of enhancements tfs with visual studio 2010 over visual studio 2008.Lot of automatic things. But Some times we need to take care of.
For example,

1)When you move the files from rootfolder to mapped folder ,still the virtual instance of original file remains as it is for that you need to unload the project
Right Click-->unload the project  then again reload.

2)When you delete the Sharepoint Project Items, And you start packaging the solution ,compiler cries  'could not find the deleted file path'.

thus you need to edit the .feature file  and remove the guid projectitemreferance and package again.
you need to edit the .csproj file-->ctrl+f-->Find project referance guid as mentioned above.And remove the referance

If you know better way or best practices working with tfs integrated with sharepoint project please do the comments