WizardStepBase.Title Property

 

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

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

public virtual string Title { get; set; }

Property Value

Type: System.String

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

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 ASP.NET Globalization and Localization.

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>

.NET Framework
Available since 2.0
Return to top
Show: