LayoutEditorPart.Title Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a title for the editor 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)

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 a LayoutEditorPart control when the control is visible in edit mode. When the control is declared in a page, you can set a value for the Title attribute. If you do not supply a value for the title, a culture-specific default value is used to describe the properties that this control allows users to edit.

This code example demonstrates how to use the Title property of a LayoutEditorPart control. For the full code required to run the example, see the Example section of the LayoutEditorPart class overview.

The following code shows how to set the title on a LayoutEditorPart control declaratively in a Web page.

<asp:EditorZone ID="EditorZone1" runat="server" 
  style="z-index: 102; left: 340px; position: absolute; top: 90px" 
    <asp:LayoutEditorPart ID="LayoutEditorPart1" runat="server" 
      Title="My Layout Editor" OnPreRender="LayoutEditorPart1_PreRender" />

The next part of the code example shows how to set the value of the Title property programmatically.

protected void Button1_Click(object sender, EventArgs e)
  LayoutEditorPart1.Title = Server.HtmlEncode(TextBox1.Text);

When you load the page in a browser, you can select Edit Mode in the Display Mode drop-down list control to switch to edit mode. You can click the verbs menu (the downward arrow) in the title bar of the Author List WebPart control, and click Edit to begin editing. When the editing user interface (UI) is visible, you can see the LayoutEditorPart control, and a button and text box positioned above it. Note that the title of the LayoutEditorPart control is the value assigned to it in the declarative markup of the Web page. If you enter some text in the text box next to the Update EditorPart Title button, and then click the button, the title for the control is updated.

Windows 98, Windows 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0