Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I know everyone does this, but I can't find an actual answer to what this does on MSDN...

When you have a WebPartZone defined in a page, you set the Title property like:

<WebPartPages:WebPartZone runat="server" ID="Center" Title="loc:Center">
  ...
</WebPartPages:WebPartZone>

You can find plenty of examples like this on this site:

Rendering Webpartzone is to large

positioning a data view web part in a body webpartzone

default custome webpart became static on custom site page

I assume "loc:" means localization (or perhaps it means location?). But what does this do?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In SharePoint 2010 WebPartZone Title property is obsolete and DisplayTitle should be used instead.

Title property is declared as

[Obsolete("Use DisplayTitle instead.")]
    public string Title
    {
      get
      {
        return this.DisplayTitle;
      }
      set
      {
        this.HeaderText = value;
      }
    }

According to MSDN DisplayTitle property:

A string that contains the title text for a zone. The default is the value of the base HeaderText property.

DisplayTitle

DisplayTitle property value could be specified as a regular string or localization string. For case of localization string the following format is used: "loc:{ResourceKey}",for example "loc:Center"

In that case it value is retrieved by key from resource file Microsoft.SharePoint.WebPartPages.strings.resources embedded into assembly Microsoft.SharePoint.intl.dll

share|improve this answer
    
Thanks! That's what I assumed it did, but I was unaware that it was obsolete! –  RJ Cuthbertson Feb 28 '13 at 21:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.