Export (0) Print
Expand All

ImportCatalogPart.Title Property

Gets or sets the title that appears in the title bar of an ImportCatalogPart control.

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

public override string Title { get; set; }
/** @property */
public String get_Title ()

/** @property */
public void set_Title (String value)

public override function get Title () : String

public override function set Title (value : String)

Not applicable.

Property Value

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 an ImportCatalogPart 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 how to use the Title property declaratively and programmatically. For the full code and instructions required to run the example, see the Example section of the ImportCatalogPart class overview.

In the following section of code, notice that the Title property value is set declaratively for the control.

<asp:CatalogZone ID="CatalogZone1" runat="server">
  <ZoneTemplate>
    <asp:ImportCatalogPart ID="ImportCatalogPart1" 
      runat="server" 
      Title="My ImportCatalogPart" 
      OnPreRender="ImportCatalogPart1_PreRender"
      BrowseHelpText="Type a path or browse to find a control's 
        description file." 
      UploadButtonText="Upload Description File" 
      UploadHelpText="Click the button to upload the description 
        file."
      ImportedPartLabelText="My User Information WebPart" 
      PartImportErrorLabelText="An error occurred while trying 
        to import a description file."  />
  </ZoneTemplate>
</asp:CatalogZone>

In this section of code, the Title property value is assigned programmatically.

protected void Button1_Click(object sender, EventArgs e)
{
  ImportCatalogPart1.Title = "Import Server Controls";
  ImportCatalogPart1.BrowseHelpText = "Enter the path to a "
    + "description file.";
  ImportCatalogPart1.UploadButtonText = "Upload Description";
  ImportCatalogPart1.UploadHelpText = "Upload a description file.";
  ImportCatalogPart1.ImportedPartLabelText = "Imported Controls";
  ImportCatalogPart1.PartImportErrorLabelText = "An error occured " 
    + "during the import process.";

}

When you load the page in a browser, you can use the Display Mode drop-down list control to select Catalog Mode and switch the page to catalog mode. With the page in catalog mode and the description file uploaded, note the various text strings displayed in the user interface (UI) for the ImportCatalogPart control. If you click the Upload Description File button, the text for several of the properties in the UI is changed, including the text for the Title property.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft