This project is read-only.


SharePoint Expressions allow developers to quickly retrieve SharePoint variables by using the ASP.NET Mark-up.


The following example assigns the current user's display name to the literal control:

<asp:Literal runat="server" id="ltCurrentUser" Text="<%$ SharePoint: CurrentUserDisplayName %>" />

To HTML encode your output simply append ",html" to your expression:

<asp:Literal runat="server" id="ltCurrentUser" Text="<%$ SharePoint: CurrentUserDisplayName,html %>" />

Same rule applied for URL Encoding:

<asp:Literal runat="server" id="ltCurrentUser" Text="<%$ SharePoint: CurrentUserDisplayName,url %>" />

Supported Expressions

The following expressions are currently supported:

  • CurrentSiteUrl: Returns the current site collection’s server relative URL.
  • CurrentSiteFullUrl: Returns the current site collection’s full URL.
  • CurrentSiteTitle: Returns the current site collection’s title.
  • CurrentSiteDescription: Returns the current site collection’s description.
  • CurrentSiteLogoUrl: Returns the current site collection’s logo URL.
  • CurrentSiteLogoDescription: Returns the current site collection’s logo description.
  • CurrentWebUrl: Returns the current site’s server relative URL.
  • CurrentWebFullUrl: Returns the current site’s full URL.
  • CurrentWebTitle: Returns the current site’s title.
  • CurrentWebDescription: Returns the current site’s description.
  • CurrentWebLogoUrl: Returns the current site’s logo URL.
  • CurrentWebLogoDescription: Returns the current site’s logo description.
  • CurrentUserDisplayName: Returns the current user’s display name.
  • CurrentUserLoginName: Returns the current user’s login name.
  • CurrentUserEmail: Returns the current user’s e-mail address.
  • CurrentUserNotes: Returns the current user’s notes.
  • CurrentUserNotes: Returns the current user's notes.
  • CurrentListTitle: Return the current list's title.
  • CurrentListDescription: Return the current list's description.
  • CurrentListDefaultViewTitle: Return the current list's default view title.
  • CurrentListDefaultViewUrl: Returns the current list's default view URL.

Parameterised Expressions

Some List Expressions require a parameter to indicate the list to retrieve. SharePoint Expressions support the list's title if it is within the current site, or list URL:

<asp:Literal runat="server" id="ltDocsListTitle" Text="<%$ SharePoint: ListTitle,/Documents%>" />

<asp:Literal runat="server" id="ltDocsListTitle" Text="<%$ SharePoint: ListTitle,Documents%>" />

<asp:Literal runat="server" id="ltDocsListTitle" Text="<%$ SharePoint: ListTitle,/Documents,html%>" />

  • ·     ListTitle:
  • ·    
  • ·     ListDefaultViewTitle:
  • ·     ListDefaultViewUrl:

All expressions are case insensitive.

Status updates and comments on my blog

Last edited Dec 30, 2010 at 1:22 AM by Lambros, version 10