PageCatalogPart.Title Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the title that appears in the control's title bar.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public override string Title { get; set; }

Property Value

Type: System.String

A string that is used as the title of the control. The default value is a calculated control name supplied by the Web Parts control set.

The Title property value is displayed in the title bar of a PageCatalogPart control when the control is visible in catalog mode. When the control is declared in a page, you can set a value for the property by using the Title attribute. If you do not supply a value for the title, a culture-specific default value is used to describe the kind of properties that this control allows users to edit.

The following code example demonstrates the declarative use of the Title property. For the full code required to run the example, see the Example section of the PageCatalogPart class overview.

The following source code shows how to set the Title property on the control in declarative markup. If you do not set the property, or if you assign an empty string (""), a default title is supplied.

<asp:CatalogZone ID="CatalogZone1" runat="server">
  <ZoneTemplate>
    <asp:PageCatalogPart ID="PageCatalogPart1" runat="server" 
      Title="My Page Catalog" 
      ChromeType="Titleonly" />
    <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1"  
      runat="server" 
      Description="Contains a user control with Web Parts and 
        an ASP.NET Calendar control.">
      <WebPartsTemplate>
        <asp:Calendar ID="Calendar1" runat="server" 
          Title="My Calendar" 
          Description="ASP.NET Calendar control used as a personal calendar." />
        <aspSample:UserInfoWebPart 
          runat="server"   
          id="userinfo1" 
          title = "User Information WebPart"
          Description ="Contains custom, editable user information 
            for display on a page." />
        <aspSample:TextDisplayWebPart 
          runat="server"   
          id="TextDisplayWebPart1" 
          title = "Text Display WebPart" 
          Description="Contains a label that users can dynamically update." />
      </WebPartsTemplate>              
    </asp:DeclarativeCatalogPart>
  </ZoneTemplate>
</asp:CatalogZone>

.NET Framework
Available since 2.0
Return to top
Show: