Επεξεργασία

Κοινή χρήση μέσω


WizardStepBase.Title Property

Definition

Gets or sets the title to use for a step in a Wizard control when the sidebar feature is enabled.

public:
 virtual property System::String ^ Title { System::String ^ get(); void set(System::String ^ value); };
public virtual string Title { get; set; }
member this.Title : string with get, set
Public Overridable Property Title As String

Property Value

The title to use for a step in a Wizard control when the sidebar feature is enabled. The default value is an empty string ("").

Examples

The following example demonstrates using the Title property to display a user-friendly title for a step in the Wizard control. In the example, Step1 does not have its Title property set, so it appears in the Wizard control as "WizardStep1". Step2 does have its Title property set, so it appears as "Step 2".

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <asp:Wizard id="Wizard1" 
        runat="server" >
        <WizardSteps>
          <asp:WizardStep ID="WizardStep1"
            runat="server">
          </asp:WizardStep>
          <asp:WizardStep ID="WizardStep2" title="Step 2" 
            runat="server">
          </asp:WizardStep>
        </WizardSteps>
        <HeaderTemplate>
          <b>WizardStepBase Title Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <asp:Wizard id="Wizard1" 
        runat="server" >
        <WizardSteps>
          <asp:WizardStep ID="WizardStep1"
            runat="server">
          </asp:WizardStep>
          <asp:WizardStep ID="WizardStep2" title="Step 2" 
            runat="server">
          </asp:WizardStep>
        </WizardSteps>
        <HeaderTemplate>
          <b>WizardStepBase Title Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>

Remarks

Use the Title property to display a user-friendly title for a step in a Wizard control when the sidebar feature is enabled. If the Title property is not set and the sidebar feature is enabled, the value of the ID property is displayed for the sidebar button.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and Globalization and Localization.

Applies to

See also