Export (0) Print
Expand All

TemplatedWizardStep Class

Represents a step in a wizard control that can be customized through the use of templates.

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

[ThemeableAttribute(true)]
[BindableAttribute(false)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class TemplatedWizardStep : WizardStepBase
<asp:TemplatedWizardStep />

The TemplatedWizardStep class is provided to enable developers to apply a template to the steps in a control that acts as a wizard. The TemplatedWizardStep class is intended to be used primarily by control developers.

You can apply a theme to TemplatedWizardStep.

The TemplatedWizardStep class allows you to customize the content and navigation templates within it. The following example shows how to define a template-based wizard step.

NoteNote:

The CustomNavigationTemplate property allows you to take full control of the navigation block, usually displayed at the bottom of the current view. Normally, you fill the navigation block with a series of buttons. However, other controls are acceptable as long as they support command bubbling, as does the Button control.

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>TemplatedWizardStep Example</title>

    <script runat="server">
        void OnPreviousButtonClick(Object sender, WizardNavigationEventArgs e)
        {
            // Display feedback
            FeedbackID.Text = "Previous button clicked";
        }

        void OnNextButtonClick(Object sender, WizardNavigationEventArgs e)
        {
            // Display feedback.
            FeedbackID.Text = "Next button clicked";
        }
    </script>

</head>

<body>
    <form id="form1" runat="server">

        <asp:Wizard ID="Wizard1" runat="server" 
            OnPreviousButtonClick="OnPreviousButtonClick" 
            OnNextButtonClick="OnNextButtonClick">
        <WizardSteps>
            <asp:TemplatedWizardStep StepType="Auto">
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server" 
                        BackColor="blue"  Font-Bold="true" ForeColor="yellow">
                     Simple TemplatedWizardStep Example</asp:Label>
                </ContentTemplate>
                <CustomNavigationTemplate>
                    <div style="margin: 1em 1em;">
                        <asp:Button ID="PreviousButtonID" runat="server" Font-Bold="true"  
                            BackColor="Red" Text="Previous" CommandName="MovePrevious"/>
                        <asp:Button ID="NextButtonID" runat="server"   Font-Bold="true" 
                            BackColor="Aqua" Text="Next" CommandName="MoveNext"/>
                    </div>
                </CustomNavigationTemplate>
            </asp:TemplatedWizardStep>
        </WizardSteps>

        </asp:Wizard>

        <asp:Label ID="FeedbackID" runat="server" BackColor="yellow" ForeColor="red"/>
    </form>

</body>
</html>

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft