简体   繁体   中英

Validation (ASP.Net): Attribute 'DisplayTitle' is not a valid attribute of element 'WebPartZone'

I have a SharePoint WebPartZone declared on an ASP.NET page.

This is not the same as the <asp:WebPartZone/> control.

<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<WebPartPages:WebPartZone ID="LeftNavZone" runat="server" DisplayTitle="loc:LeftNavZone">
</WebPartPages:WebPartZone>

Visual Studio 2010 displays the following "Message" in the Error List window:

Validation (ASP.Net): Attribute 'DisplayTitle' is not a valid attribute of element 'WebPartZone'.

When it most certainly is...

WebPartZone.DisplayTitle Property

And this isn't an issue of class confusion, as DisplayTitle is also a property of the System.Web.UI.WebControls.WebParts.WebPartZone control (inherited from WebPartZoneBase ):

WebPartZoneBase.DisplayTitle Property

So what gives? And how can I get rid of this message?

There's one of these messages for every page in my project when I have it open... certainly annoying.

DisplayTitle is read only...

It needs to be set via the HeaderText property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM