Sunday, 29 August 2010

SharePoint 2010: Cannot find link to Master Page / Page Layouts?

1. Click on “Site Actions”

- Click on “Site Collection Features”

- Enable “SharePoint Server Publishing Infrastructure”

 

2.  - Click on “Site Actions”

- Click on “Manage site features”

- Enable “SharePoint Server Publishing”

Saturday, 28 August 2010

Session state can only be used when enableSessionState is set to true ... SharePoint 2010

In web.config

1. <pages enablesessionstate="true">

2. <modules runallmanagedmodulesforallrequests="true">
..
..
<remove name="Session">
<add name="Session" type="System.Web.SessionState.SessionStateModule" precondition="">

3. <pageparserpaths>
<pageparserpath virtualpath="/*" compilationmode="Always" allowserversidescript="true" includesubfolders="true"></pageparserpaths>

Save and exit.

Friday, 20 August 2010

How do i get Root Web Url ?

SPContext.Current.Site.RootWeb.Url

Thursday, 19 August 2010

LLBLGen - EntityCollection to DataTable Conversion?

public DataTable CollectionToDataTable(EntityCollectionBase collection, string TableName)
where TEntity : EntityBase, IEntity
{
List propertyProjectors =
EntityFields.ConvertToProjectors(collection.EntityFactoryToUse.CreateFields());
DataTable dt = new DataTable(TableName);
collection.DefaultView.CreateProjection(propertyProjectors, dt);
return dt;
}

Reference: http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=77377&ThreadID=3861