Wizard 類別

定義

提供巡覽和使用者介面 (UI),在多個步驟中收集相關資料。

public ref class Wizard : System::Web::UI::WebControls::CompositeControl
[System.ComponentModel.Bindable(false)]
public class Wizard : System.Web.UI.WebControls.CompositeControl
[<System.ComponentModel.Bindable(false)>]
type Wizard = class
    inherit CompositeControl
Public Class Wizard
Inherits CompositeControl
繼承
衍生
屬性

範例

下列程式碼範例示範如何定義 Wizard 控制項來收集使用者的名稱和位址,以及輸入個別寄送位址的選項。 如果使用者未選取 [SeparateShippingCheckBox],因此發出要求以新增個別的寄送位址,控制項 Wizard 會直接從 Step2 移至 FinishFinish在步驟中,使用者可以選擇按一下GoBackButton返回控制項的 Wizard 開頭;不過,它會讓使用者 Step2 前往 ,因為 AllowReturn 的 屬性 Step1 設定為 false

重要

這個範例有一個可接受使用者輸入的文字方塊,這可能會造成安全性威脅。 根據預設,ASP.NET Web 網頁會驗證使用者輸入未包含指令碼或 HTML 項目。 如需詳細資訊,請參閱 Script Exploits Overview (指令碼攻擊概觀)。

<%@ Page Language="C#" CodeFile="WizardClass.cs" Inherits="WizardClasscs_aspx" %>

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

<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" 
        onfinishbuttonclick="OnFinishButtonClick" 
        backcolor="#EFF3FB" 
        font-names="Verdana" 
        font-size="0.8em"
        borderwidth="1px" 
        bordercolor="#B5C7DE" 
        style="font-size: medium; font-family: Verdana;" 
        onactivestepchanged="OnActiveStepChanged">       
      <StepStyle forecolor="#333333" 
        font-size="0.8em" />
        <WizardSteps>        
          <asp:WizardStep id="Step1" 
            title="One"
            allowreturn="false" 
            runat="server" >
            Welcome to the Wizard example.  This step's AllowReturn property is set 
            to false, so after you leave this step you will not be able to return to it.
          </asp:WizardStep>          
          <asp:WizardStep id="Step2"
            title="Two" 
            runat="server" >
            <!-- ... Put UI elements here ... -->
            Please enter your billing information.
            <br />
            Name:<br />
            <asp:TextBox runat="server" 
              id="BillingName" 
              width="226px" 
              height="17px" /> 
            <br />
            Email Address:<br />
            <asp:TextBox runat="server" 
              id="EmailAddress" 
              width="224px" 
              height="17px" />
            <br />
            Address Line 1: <br />
            <asp:TextBox runat="server" 
              id="BillingAddressLine1" 
              width="314px" 
              height="17px" />
            <br />
            Address Line 2: <br />
            <asp:TextBox runat="server" 
              id="BillingAddressLine2" 
              width="314px" 
              height="17px" />
            <br />
            City: <br />
            <asp:TextBox runat="server" 
              id="BillingCity" 
              width="155px" 
              height="17px" /> 
            <br />
            State: <br />
            <asp:TextBox runat="server" 
              id="BillingState" 
              width="75px" 
              height="17px" /> 
            <br />
            ZIP Code: <br />
            <asp:TextBox runat="server" 
              id="BillingZip" 
              height="17px" />
            <br /><br />
            <asp:CheckBox runat="server" 
              id="SeparateShippingCheckBox" 
              text="Please check here if you would like to add a separate shipping address." />
          </asp:WizardStep>          
          <asp:WizardStep id="Step3" 
            title="Three" 
            runat="server" >
            <!-- Gather the shipping address in this step if CheckBox1 was selected. -->
            Please enter your shipping information.
            <br />
                Name:<br />
                <asp:TextBox runat="server" 
                  id="ShippingName" 
                  height="17px" /> 
                <br />
                Address Line 1: <br />
                <asp:TextBox runat="server" 
                  id="ShippingAddress1" 
                  width="370px" 
                  height="17px" />
                <br />
                Address Line 2: <br />
                <asp:TextBox runat="server" 
                  id="ShippingAddress2" 
                  width="370px" 
                  height="17px" />
                <br />
                City: <br />
                <asp:TextBox runat="server" 
                  id="ShippingCity" 
                  height="17px" /> 
                <br />
                State: <br />
                <asp:TextBox runat="server" 
                  id="ShippingState" 
                  width="65px" 
                  height="17px" />
                <br /> 
                ZIP Code: <br />
                <asp:TextBox runat="server" 
                  id="ShippingZip" 
                  height="17px" />
          </asp:WizardStep>
          <asp:WizardStep id="Finish" 
            title="Finish"
            runat="server" >
            <!-- Put UI elements here for the Finish step. -->
            <asp:Button runat="server" 
              id="GoBackButton" 
              text="Go Back to Step 2" 
              onclick="OnGoBackButtonClick"
              forecolor="#284E98" 
              font-names="Verdana"
              font-size="1.0em" 
              borderstyle="Solid" 
              borderwidth="1px" 
              bordercolor="#507CD1" 
              backcolor="White" /> 
          </asp:WizardStep>          
          <asp:WizardStep runat="server" 
            steptype="Complete" 
            title="Complete" 
            id="Complete">
            <asp:Label runat="server" 
              id="CompleteMessageLabel" 
              width="408px" 
              height="24px">
            </asp:Label>
          </asp:WizardStep>
        </WizardSteps> 
        <NavigationButtonStyle forecolor="#284E98" 
          font-names="Verdana"
          font-size="1.0em" 
          borderstyle="Solid" 
          borderwidth="1px" 
          bordercolor="#507CD1" 
          backcolor="White" />
        <HeaderStyle forecolor="White" 
          horizontalalign="Center" 
          font-size="0.9em" 
          font-bold="True"
          backcolor="#284E98" 
          borderstyle="Solid" 
          bordercolor="#EFF3FB" 
          borderwidth="2px" />
        <SideBarStyle verticalalign="Top" 
          horizontalalign="Center"
          font-size="0.8em" 
          forecolor="#000099"
          backcolor="#EFF3FB"
          width="45px" />
        <HeaderTemplate>
          <b>Wizard Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="WizardClass.vb" Inherits="WizardClassvb_aspx" %>

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

<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" 
        onfinishbuttonclick="OnFinishButtonClick" 
        backcolor="#EFF3FB" 
        font-names="Verdana" 
        font-size="0.8em"
        borderwidth="1px" 
        bordercolor="#B5C7DE" 
        style="font-size: medium; font-family: Verdana;" 
        onactivestepchanged="OnActiveStepChanged">       
      <StepStyle forecolor="#333333" 
        font-size="0.8em" />
        <WizardSteps>        
          <asp:WizardStep id="Step1" 
            title="One"
            allowreturn="false" 
            runat="server" >
            Welcome to the Wizard example.  This step's AllowReturn property is set 
            to false, so after you leave this step you will not be able to return to it.
          </asp:WizardStep>          
          <asp:WizardStep id="Step2"
            title="Two" 
            runat="server" >
            <!-- ... Put UI elements here ... -->
            Please enter your billing information.
            <br />
            Name:<br />
            <asp:TextBox runat="server" 
              id="BillingName" 
              width="226px" 
              height="17px" /> 
            <br />
            Email Address:<br />
            <asp:TextBox runat="server" 
              id="EmailAddress" 
              width="224px" 
              height="17px" />
            <br />
            Address Line 1: <br />
            <asp:TextBox runat="server" 
              id="BillingAddressLine1" 
              width="314px" 
              height="17px" />
            <br />
            Address Line 2: <br />
            <asp:TextBox runat="server" 
              id="BillingAddressLine2" 
              width="314px" 
              height="17px" />
            <br />
            City: <br />
            <asp:TextBox runat="server" 
              id="BillingCity" 
              width="155px" 
              height="17px" /> 
            <br />
            State: <br />
            <asp:TextBox runat="server" 
              id="BillingState" 
              width="75px" 
              height="17px" /> 
            <br />
            ZIP Code: <br />
            <asp:TextBox runat="server" 
              id="BillingZip" 
              height="17px" />
            <br /><br />
            <asp:CheckBox runat="server" 
              id="SeparateShippingCheckBox" 
              text="Please check here if you would like to add a separate shipping address." />
          </asp:WizardStep>          
          <asp:WizardStep id="Step3" 
            title="Three"
            runat="server" >
            <!-- Gather the shipping address in this step if CheckBox1 was selected. -->
            Please enter your shipping information.
            <br />
                Name:<br />
                <asp:TextBox runat="server" 
                  id="ShippingName" 
                  height="17px" /> 
                <br />
                Address Line 1: <br />
                <asp:TextBox runat="server" 
                  id="ShippingAddress1" 
                  width="370px" 
                  height="17px" />
                <br />
                Address Line 2: <br />
                <asp:TextBox runat="server" 
                  id="ShippingAddress2" 
                  width="370px" 
                  height="17px" />
                <br />
                City: <br />
                <asp:TextBox runat="server" 
                  id="ShippingCity" 
                  height="17px" /> 
                <br />
                State: <br />
                <asp:TextBox runat="server" 
                  id="ShippingState" 
                  width="65px" 
                  height="17px" />
                <br /> 
                ZIP Code: <br />
                <asp:TextBox runat="server" 
                  id="ShippingZip" 
                  height="17px" />
          </asp:WizardStep>
          <asp:WizardStep id="Finish" 
            title="Finish"
            runat="server" >
            <!-- Put UI elements here for the Finish step. -->
            <asp:Button runat="server" 
              id="GoBackButton" 
              text="Go Back to Step 2" 
              forecolor="#284E98" 
              font-names="Verdana"
              font-size="1.0em" 
              borderstyle="Solid" 
              borderwidth="1px" 
              bordercolor="#507CD1" 
              backcolor="White" /> 
          </asp:WizardStep>          
          <asp:WizardStep runat="server" 
            steptype="Complete" 
            title="Complete" 
            id="Complete">
            <asp:Label runat="server" 
              id="CompleteMessageLabel" 
              width="408px" 
              height="24px">
            </asp:Label>
          </asp:WizardStep>
        </WizardSteps> 
        <NavigationButtonStyle forecolor="#284E98" 
          font-names="Verdana"
          font-size="1.0em" 
          borderstyle="Solid" 
          borderwidth="1px" 
          bordercolor="#507CD1" 
          backcolor="White" />
        <HeaderStyle forecolor="White" 
          horizontalalign="Center" 
          font-size="0.9em" 
          font-bold="True"
          backcolor="#284E98" 
          borderstyle="Solid" 
          bordercolor="#EFF3FB" 
          borderwidth="2px" />
        <SideBarStyle verticalalign="Top" 
          horizontalalign="Center"
          font-size="0.8em" 
          forecolor="#000099"
          backcolor="#EFF3FB"
          width="45px" />
        <HeaderTemplate>
          <b>Wizard Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>

下列程式碼範例是上述範例中使用的網頁程式碼後置檔案。

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class WizardClasscs_aspx : System.Web.UI.Page
{
    protected void OnFinishButtonClick(Object sender, WizardNavigationEventArgs e)
    {
        // The OnFinishButtonClick method is a good place to collect all
        // the data from the completed pages and persist it to the data store. 

        // For this example, write a confirmation message to the Complete page
        // of the Wizard control.
        Label tempLabel = (Label)Wizard1.FindControl("CompleteMessageLabel");
        if (tempLabel != null)
        {
            tempLabel.Text = "Your order has been placed. An email confirmation will be sent to "
            + (EmailAddress.Text.Length == 0 ? "your email address" : EmailAddress.Text) + ".";
        }
    }

    protected void OnGoBackButtonClick(object sender, EventArgs e)
    {
        // The GoBackButtonClick event is raised when the GoBackButton
        // is clicked on the Finish page of the Wizard.  

        // Check the value of Step1's AllowReturn property.
        if (Step1.AllowReturn)
        {
            // Return to Step1.
            Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(this.Step1);
        }
        else
        {
            // Step1 is not a valid step to return to; go to Step2 instead.
            Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(this.Step2);
            Response.Write("ActiveStep is set to Step2 because Step1 has AllowReturn set to false.");
        }
    }

    protected void OnActiveStepChanged(object sender, EventArgs e)
    {
        // If the ActiveStep is changing to Step3, check to see whether the 
        // SeparateShippingCheckBox is selected.  If it is not, skip to the
        // Finish step.
        if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.Step3))
        {
            if (this.SeparateShippingCheckBox.Checked)
            {
                Wizard1.MoveTo(this.Step3);
            }
            else
            {
                Wizard1.MoveTo(this.Finish);
            }
        }
    }
}
Partial Class WizardClassvb_aspx
    Inherits System.Web.UI.Page

   Protected Sub OnFinishButtonClick(ByVal sender As Object, ByVal e As WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick

        ' The OnFinishButtonClick method is a good place to collect all
        ' the data from the completed pages and persist it to the data store. 

        ' For this example, write a confirmation message to the Complete page
        ' of the Wizard control.
        Dim tempLabel As Label = CType(Wizard1.FindControl("CompleteMessageLabel"), Label)
        If Not tempLabel Is Nothing Then

            Dim tempEmailAddress As String = "your email address"
            If EmailAddress.Text.Length <> 0 Then
                tempEmailAddress = EmailAddress.Text
            End If

            tempLabel.Text = "Your order has been placed. An email confirmation will be sent to " & _
                tempEmailAddress & "."

        End If
    End Sub

    Protected Sub OnGoBackButtonClick(ByVal sender As Object, ByVal e As EventArgs) Handles GoBackButton.Click

        ' The GoBackButtonClick event is raised when the GoBackButton
        ' is clicked on the Finish page of the Wizard.  

        ' Check the value of Step1's AllowReturn property.
        If Step1.AllowReturn Then
            ' Return to Step1.
            Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(Me.Step1)
        Else
            ' Step1 is not a valid step to return to; go to Step2 instead.
            Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(Me.Step2)
            Response.Write("ActiveStep is set to Step2 because Step1 has AllowReturn set to false.")
        End If
    End Sub

    Protected Sub OnActiveStepChanged(ByVal sender As Object, ByVal e As EventArgs) Handles Wizard1.ActiveStepChanged

        ' If the ActiveStep is changing to Step3, check to see whether the 
        ' SeparateShippingCheckBox is selected.  If it is not, skip to the
        ' Finish step.

        If (Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(Me.Step3)) Then

            If (Me.SeparateShippingCheckBox.Checked) Then
                Wizard1.MoveTo(Me.Step3)
            Else
                Wizard1.MoveTo(Me.Finish)
            End If

        End If
    End Sub

End Class

備註

本主題內容:

簡介

您可以使用 Wizard 控制項來:

  • 跨多個步驟收集相關資料。

  • 將用來收集使用者輸入的較大網頁分成較小的邏輯步驟。

  • 允許透過步驟進行線性或非線性導覽。

精靈元件

控制項 Wizard 是由下列元件所組成:

  • 包含 WizardStepCollection 每個步驟使用者介面的步驟集合,如頁面開發人員所定義。

  • 內建導覽功能,可決定要根據 StepType 值顯示的適當按鈕。

  • 標頭區域,可自訂以顯示使用者目前所在的步驟專屬資訊。

  • 側邊欄區域,可用來快速巡覽至 控制項中的步驟。

    注意

    如果您使用 Microsoft Visual Studio 2005,請注意,會 ActiveStepIndex 保存在 [來源] 檢視中。 如果您按一下提要欄位按鈕來變更 WizardSteps [設計] 檢視中的屬性,然後執行頁面,則可能不會顯示控制項的第一個步驟 Wizard ,因為 ActiveStepIndex 可能指向不同的步驟。

精靈步驟

控制項中的每個 Wizard 步驟都有屬性 StepType ,可決定步驟擁有的流覽功能種類。 如果您未指定 屬性的值 StepType ,預設值為 Auto 。下表列出 屬性的可用設定 StepType ,以及步驟的結果行為。

WizardStepType.Auto 為步驟轉譯的導覽 UI 取決於宣告步驟的順序。

WizardStepType.Complete 此步驟是要顯示的最後一個步驟。 不會呈現巡覽按鈕。

WizardStepType.Finish 此步驟是收集使用者資料的最後一個步驟。 [ 完成] 按鈕會轉譯為流覽。

WizardStepType.Start 此步驟是第一個要出現的步驟。 不會轉譯 上一個 按鈕。

WizardStepType.Step 此步驟是第一個與最後一個步驟之間的任何步驟。 應呈現出 [上一步] 和 [下一步] 巡覽按鈕。

收集精靈資料

Wizard使用 控制項時,資料可以透過線性或非線性導覽來收集。 非線性導覽的一些範例會略過不必要的步驟,或返回先前完成的步驟來變更某些值。 控制項 Wizard 會在步驟之間維持其狀態,因此在完成控制項的所有步驟 Wizard 之前,不需要將步驟上輸入的資料保存到資料存放區。

或者,如果您想要在完成每個步驟時將資料保存到資料存放區,例如引發事件時 NextButtonClick ,您應該將 物件的 屬性 WizardStepBase 設定 AllowReturnfalse ,讓使用者無法在提交資料後返回先前完成的步驟並變更資料。

精靈命令名稱

控制項 Wizard 會從 View 類別和 MultiView 類別繼承下列命令名稱: NextViewCommandNamePreviousViewCommandNameSwitchViewByIDCommandNameSwitchViewByIndexCommandName 。 精靈控制項會忽略這些命令名稱,而且不包含任何特殊邏輯,可讓這些命令自動運作以進行導覽。 如果命令名稱已移除或遺失控制項中的 Wizard 按鈕,則不會擲回任何例外狀況。 例如,如果 StartNavigationTemplate 按鈕遺漏 的值 CommandName ,則不會擲回任何例外狀況。

動態變更步驟

您可以使用 MoveTo 方法或 ActiveStepIndex 屬性,動態變更控制項中 Wizard 目前顯示的步驟。

注意

如果您以程式設計方式在 Page_Load 事件處理常式中新增 WizardStep ,則必須在頁面載入之前,將流覽新增至該步驟。

精靈外觀

控制項的外觀 Wizard 可透過範本、外觀和樣式設定完全自訂。 例如,您可以使用 HeaderTemplateSideBarTemplateStartNavigationTemplateFinishNavigationTemplateStepNavigationTemplate 屬性來自訂 控制項的 Wizard 介面。

注意

FinishNavigationTemplate設定 、 DisplaySideBarHeaderTemplateSideBarTemplateStartNavigationTemplateStepNavigationTemplate 屬性會重新建立 控制項的 Wizard 子控制項。 因此,子控制項的檢視狀態會在進程中遺失。 若要避免這種情況,請明確維護控制項子控制項的控制項狀態 Wizard ,或避免將控制項放在範本內。

請注意, Wizard 控制項不支援非標準或 quirks 模式的特殊 Microsoft Internet Explorer 轉譯。 若要使用 Wizard 控制項取得最佳的 Internet Explorer 轉譯,請使用預設在 Visual Web Developer 和 Visual Studio 中新增的 XHTML 檔案類型。

使用版面配置範本格式化

控制項 Wizard 可讓您指定控制項的配置,而不需要您使用 HTML table 元素。 相反地,您可以使用 LayoutTemplate 元素來指定版面配置。 在範本中,您會建立預留位置控制項,以指出專案應該動態插入控制項的位置。 (這類似于控制項的 ListView 範本模型運作方式。) 如需詳細資訊,請參閱 Wizard.LayoutTemplate 屬性。

Accessibility

如需如何設定此控制項以產生符合協助工具標準的標記的相關資訊,請參閱 Visual Studio 中的協助工具,以及 ASP.NETASP.NET 控制項和協助工具

宣告式語法

<asp:Wizard
    AccessKey="string"
    ActiveStepIndex="integer"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
        Inset|Outset"
    BorderWidth="size"
    CancelButtonImageUrl="uri"
    CancelButtonText="string"
    CancelButtonType="Button|Image|Link"
    CancelDestinationPageUrl="uri"
    CellPadding="integer"
    CellSpacing="integer"
    CssClass="string"
    DisplayCancelButton="True|False"
    DisplaySideBar="True|False"
    Enabled="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    FinishCompleteButtonImageUrl="uri"
    FinishCompleteButtonText="string"
    FinishCompleteButtonType="Button|Image|Link"
    FinishDestinationPageUrl="uri"
    FinishPreviousButtonImageUrl="uri"
    FinishPreviousButtonText="string"
    FinishPreviousButtonType="Button|Image|Link"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
        Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    HeaderText="string"
    Height="size"
    ID="string"
    OnActiveStepChanged="ActiveStepChanged event handler"
    OnCancelButtonClick="CancelButtonClick event handler"
    OnDataBinding="DataBinding event handler"
    OnDisposed="Disposed event handler"
    OnFinishButtonClick="FinishButtonClick event handler"
    OnInit="Init event handler"
    OnLoad="Load event handler"
    OnNextButtonClick="NextButtonClick event handler"
    OnPreRender="PreRender event handler"
    OnPreviousButtonClick="PreviousButtonClick event handler"
    OnSideBarButtonClick="SideBarButtonClick event handler"
    OnUnload="Unload event handler"
    runat="server"
    SkinID="string"
    SkipLinkText="string"
    StartNextButtonImageUrl="uri"
    StartNextButtonText="string"
    StartNextButtonType="Button|Image|Link"
    StepNextButtonImageUrl="uri"
    StepNextButtonText="string"
    StepNextButtonType="Button|Image|Link"
    StepPreviousButtonImageUrl="uri"
    StepPreviousButtonText="string"
    StepPreviousButtonType="Button|Image|Link"
    Style="string"
    TabIndex="integer"
    ToolTip="string"
    Visible="True|False"
    Width="size"
>
        <CancelButtonStyle />
        <FinishCompleteButtonStyle />
        <FinishNavigationTemplate>
            <!-- child controls -->
        </FinishNavigationTemplate>
        <FinishPreviousButtonStyle />
        <HeaderStyle />
        <HeaderTemplate>
            <!-- child controls -->
        </HeaderTemplate>
        <NavigationButtonStyle />
        <NavigationStyle />
        <SideBarButtonStyle />
        <SideBarStyle />
        <SideBarTemplate>
            <!-- child controls -->
        </SideBarTemplate>
        <StartNavigationTemplate>
            <!-- child controls -->
        </StartNavigationTemplate>
        <StartNextButtonStyle />
        <StepNavigationTemplate>
            <!-- child controls -->
        </StepNavigationTemplate>
        <StepNextButtonStyle />
        <StepPreviousButtonStyle />
        <StepStyle />
        <WizardSteps>
                <asp:TemplatedWizardStep
                    AllowReturn="True|False"
                    ContentTemplateContainer="string"
                    EnableTheming="True|False"
                    EnableViewState="True|False"
                    ID="string"
                    OnActivate="Activate event handler"
                    OnDataBinding="DataBinding event handler"
                    OnDeactivate="Deactivate event handler"
                    OnDisposed="Disposed event handler"
                    OnInit="Init event handler"
                    OnLoad="Load event handler"
                    OnPreRender="PreRender event handler"
                    OnUnload="Unload event handler"
                    runat="server"
                    SkinID="string"
                    StepType="Auto|Complete|Finish|Start|Step"
                    Title="string"
                    Visible="True|False"
>
                        <ContentTemplate>
                            <!-- child controls -->
                        </ContentTemplate>
                        <CustomNavigationTemplate>
                            <!-- child controls -->
                        </CustomNavigationTemplate>
                </asp:TemplatedWizardStep>
                <asp:WizardStep
                    AllowReturn="True|False"
                    EnableTheming="True|False"
                    EnableViewState="True|False"
                    ID="string"
                    OnActivate="Activate event handler"
                    OnDataBinding="DataBinding event handler"
                    OnDeactivate="Deactivate event handler"
                    OnDisposed="Disposed event handler"
                    OnInit="Init event handler"
                    OnLoad="Load event handler"
                    OnPreRender="PreRender event handler"
                    OnUnload="Unload event handler"
                    runat="server"
                    SkinID="string"
                    StepType="Auto|Complete|Finish|Start|Step"
                    Title="string"
                    Visible="True|False"
                />
        </WizardSteps>
</asp:Wizard>

建構函式

Wizard()

初始化 Wizard 類別的新執行個體。

欄位

CancelButtonID

指定 [取消] 按鈕的識別碼。 這個欄位是靜態且唯讀的。

CancelCommandName

擷取 [取消] 按鈕的命令名稱。 這個欄位是靜態且唯讀的。

CustomFinishButtonID

擷取自訂 [完成] 按鈕的識別碼。 這個欄位是靜態且唯讀的。

CustomNextButtonID

擷取自訂 [下一步] 按鈕的識別碼。 這個欄位是靜態且唯讀的。

CustomPreviousButtonID

擷取自訂 [上一步] 按鈕的識別碼。 這個欄位是靜態且唯讀的。

DataListID

擷取提要欄位 DataList 集合的識別項。 這個欄位是靜態且唯讀的。

FinishButtonID

擷取 [完成] 按鈕的識別碼。 這個欄位是靜態且唯讀的。

FinishPreviousButtonID

擷取 Finish 步驟之 [上一步] 按鈕的識別碼。 這個欄位是靜態且唯讀的。

HeaderPlaceholderId

取得 HeaderTemplate 控制項中 Wizard 預留位置的 ID。

MoveCompleteCommandName

擷取與 [完成] 按鈕關聯的命令名稱。 這個欄位是靜態且唯讀的。

MoveNextCommandName

擷取與 [下一步] 按鈕關聯的命令名稱。 這個欄位是靜態且唯讀的。

MovePreviousCommandName

擷取與 [上一步] 按鈕關聯的命令名稱。 這個欄位是靜態且唯讀的。

MoveToCommandName

擷取與每個提要欄位按鈕關聯的命令名稱。 這個欄位是靜態且唯讀的。

NavigationPlaceholderId

取得 StartNavigationTemplate 控制項中 Wizard 預留位置的 ID。

SideBarButtonID

擷取與每個提要欄位按鈕關聯的識別項。 這個欄位是靜態且唯讀的。

SideBarPlaceholderId

取得 SideBarTemplate 控制項中 Wizard 預留位置的 ID。

StartNextButtonID

擷取與 Start 步驟之 [下一步] 按鈕關聯的識別碼。 這個欄位是靜態且唯讀的。

StepNextButtonID

擷取與 [下一步] 按鈕關聯的識別碼。 這個欄位是靜態且唯讀的。

StepPreviousButtonID

擷取與 [上一步] 按鈕關聯的識別碼。 這個欄位是靜態且唯讀的。

WizardStepPlaceholderId

取得 WizardStep 控制項中 Wizard 預留位置的 ID。

屬性

AccessKey

取得或設定便捷鍵 (Access Key),可讓您快速巡覽至 Web 伺服器控制項。

(繼承來源 WebControl)
ActiveStep

取得目前顯示給使用者之 WizardSteps 集合中的步驟。

ActiveStepIndex

取得或設定目前 WizardStepBase 物件的索引。

Adapter

針對控制項取得瀏覽器的特定配置器。

(繼承來源 Control)
AppRelativeTemplateSourceDirectory

取得或設定包含了此控制項之 PageUserControl 物件的相對應用程式虛擬目錄。

(繼承來源 Control)
Attributes

取得任意屬性 (Attribute) 的集合 (只供呈現),不與控制項上的屬性 (Property) 對應。

(繼承來源 WebControl)
BackColor

取得或設定 Web 伺服器控制項的背景色彩。

(繼承來源 WebControl)
BindingContainer

取得包含了此控制項之資料繫結的控制項。

(繼承來源 Control)
BorderColor

取得或設定 Web 控制項的框線色彩。

(繼承來源 WebControl)
BorderStyle

取得或設定 Web 伺服器控制項的框線樣式。

(繼承來源 WebControl)
BorderWidth

取得或設定 Web 伺服器控制項的框線寬度。

(繼承來源 WebControl)
CancelButtonImageUrl

取得或設定 [取消] 按鈕的顯示影像 URL。

CancelButtonStyle

取得樣式屬性集合的參考,這些屬性定義 [取消] 按鈕的外觀。

CancelButtonText

取得或設定 [取消] 按鈕的顯示文字標題。

CancelButtonType

取得或設定呈現為 [取消] 按鈕的按鈕類型。

CancelDestinationPageUrl

取得或設定當使用者按一下 [取消] 按鈕時會導向到的 URL。

CellPadding

取得或設定儲存格內容和其框線之間的間距。

CellSpacing

取得或設定儲存格之間的間距。

ChildControlsCreated

取得值,指出是否已經建立伺服器控制項的子控制項。

(繼承來源 Control)
ClientID

取得 ASP.NET 所產生之 HTML 標記的控制項識別碼。

(繼承來源 Control)
ClientIDMode

取得或設定用來產生 ClientID 屬性值的演算法。

(繼承來源 Control)
ClientIDSeparator

取得字元值,表示在 ClientID 屬性中所使用的分隔字元。

(繼承來源 Control)
Context

取得與目前 Web 要求的伺服器控制項關聯的 HttpContext 物件。

(繼承來源 Control)
Controls

取得表示 ControlCollection 中之子控制項的 CompositeControl 物件。

(繼承來源 CompositeControl)
ControlStyle

取得 Web 伺服器控制項的樣式。 這個屬性主要由控制項開發人員使用。

(繼承來源 WebControl)
ControlStyleCreated

取得值,指出 Style 物件是否已經為 ControlStyle 屬性建立。 這個屬性主要由控制項開發人員使用。

(繼承來源 WebControl)
CssClass

取得或設定用戶端上 Web 伺服器控制項所呈現的階層式樣式表 (CSS)。

(繼承來源 WebControl)
DataItemContainer

如果命名容器實作 IDataItemContainer,則取得命名容器的參考。

(繼承來源 Control)
DataKeysContainer

如果命名容器實作 IDataKeysControl,則取得命名容器的參考。

(繼承來源 Control)
DesignMode

取得值,指出控制項是否正用於設計介面上。

(繼承來源 Control)
DisplayCancelButton

取得或設定布林值,指出是否顯示 [取消] 按鈕。

DisplaySideBar

取得或設定布林值,指出是否要在 Wizard 控制項上顯示提要欄位區域。

Enabled

取得或設定值,指出 Web 伺服器控制項是否啟用。

(繼承來源 WebControl)
EnableTheming

取得或設定值,指出佈景主題是否套用至此控制項。

(繼承來源 WebControl)
EnableViewState

取得或設定值,該值表示伺服器控制項是否對要求的用戶端而言保持其檢視狀態,以及它包含的任何子控制項狀態。

(繼承來源 Control)
Events

取得控制項事件處理常式委派 (Delegate) 的清單。 這個屬性是唯讀的。

(繼承來源 Control)
FinishCompleteButtonImageUrl

取得或設定 [完成] 按鈕的顯示影像 URL。

FinishCompleteButtonStyle

取得 Style 物件的參考,該物件定義 [完成] 按鈕的設定。

FinishCompleteButtonText

取得或設定 [完成] 按鈕的顯示文字標題。

FinishCompleteButtonType

取得或設定呈現為 [完成]Finish 按鈕的按鈕類型。

FinishDestinationPageUrl

取得或設定當使用者按一下 [完成] 按鈕時會重新導向到的 URL。

FinishNavigationTemplate

取得或設定用來在 Finish 步驟顯示巡覽區域的樣板。

FinishPreviousButtonImageUrl

取得或設定 Finish 步驟之 [上一步] 按鈕的顯示影像 URL。

FinishPreviousButtonStyle

取得 Style 物件的參考,該物件定義 Finish 步驟之 [上一步] 按鈕的設定。

FinishPreviousButtonText

取得或設定 Finish 步驟之 [上一步] 按鈕的顯示文字標題。

FinishPreviousButtonType

取得或設定在 Finish 步驟呈現為 [上一步] 按鈕的按鈕類型。

Font

取得與 Web 伺服器控制項關聯的字型屬性。

(繼承來源 WebControl)
ForeColor

取得或設定 Web 伺服器控制項的前景色彩 (通常是文字的色彩)。

(繼承來源 WebControl)
HasAttributes

取得值,指出控制項是否已經設定屬性。

(繼承來源 WebControl)
HasChildViewState

取得值,指出目前伺服器控制項的子控制項是否有任何已儲存的檢視狀態設定。

(繼承來源 Control)
HeaderStyle

取得 Style 物件的參考,該物件會在控制項上定義頁首區域的設定。

HeaderTemplate

取得或設定用來在控制項上顯示頁首區域的樣板。

HeaderText

取得或設定控制項上頁首區域的顯示文字標題。

Height

取得或設定 Web 伺服器控制項的高度。

(繼承來源 WebControl)
ID

取得或設定指派給伺服器控制項的程式設計識別項。

(繼承來源 Control)
IdSeparator

取得用來分隔控制項識別項的字元。

(繼承來源 Control)
IsChildControlStateCleared

取得值,指出這個控制項中所包含的控制項是否有控制項狀態。

(繼承來源 Control)
IsEnabled

取得值,指出是否啟用控制項。

(繼承來源 WebControl)
IsTrackingViewState

取得值,指出伺服器控制項是否正在儲存檢視狀態的變更。

(繼承來源 Control)
IsViewStateEnabled

取得值,指出這個控制項是否已啟用檢視狀態。

(繼承來源 Control)
LayoutTemplate

取得或設定 Wizard 控制項中根容器的自訂內容。

LoadViewStateByID

取得值,指出控制項是否依 ID (而不是索引) 參與載入其檢視狀態。

(繼承來源 Control)
NamingContainer

取得伺服器控制項命名容器的參考,其建立唯一命名空間,在具有相同 ID 屬性值的伺服器控制項之間作區別。

(繼承來源 Control)
NavigationButtonStyle

取得 Style 物件的參考,該物件會在控制項上定義巡覽區域中按鈕的設定。

NavigationStyle

取得 Style 物件的參考,該物件會在控制項上定義巡覽區域的設定。

Page

取得含有伺服器控制項的 Page 執行個體的參考。

(繼承來源 Control)
Parent

在網頁控制階層架構中取得伺服器控制項之父控制項的參考。

(繼承來源 Control)
RenderingCompatibility

取得值,這個值會指定將與呈現 HTML 相容的 ASP.NET 版本。

(繼承來源 Control)
SideBarButtonStyle

取得 Style 物件的參考,該物件會在提要欄位上定義按鈕的設定。

SideBarStyle

取得 Style 物件的參考,該物件會在控制項上定義提要欄位區域的設定。

SideBarTemplate

取得或設定用來在控制項上顯示提要欄位區域的樣板。

Site

當呈現在設計介面上時,取得裝載目前控制項之容器的資訊。

(繼承來源 Control)
SkinID

取得或設定要套用至控制項的面板。

(繼承來源 WebControl)
SkipLinkText

取得或設定用來呈現替代文字的值,該文字會告知螢幕助讀員略過提要欄位區域中的內容。

StartNavigationTemplate

取得或設定用來在 Start 控制項的 Wizard 步驟顯示巡覽區域的樣板。

StartNextButtonImageUrl

取得或設定 Start 步驟之 [下一步] 按鈕的顯示影像 URL。

StartNextButtonStyle

取得 Style 物件的參考,該物件定義 Start 步驟之 [下一步] 按鈕的設定。

StartNextButtonText

取得或設定 Start 步驟之 [下一步] 按鈕的顯示文字標題。

StartNextButtonType

取得或設定在 Start 步驟呈現為 [下一步] 按鈕的按鈕類型。

StepNavigationTemplate

取得或設定用來在 WizardStepBaseStartFinish 步驟以外之任何 Complete 衍生物件上顯示巡覽區域的樣板。

StepNextButtonImageUrl

取得或設定 [下一步] 按鈕的顯示影像 URL。

StepNextButtonStyle

取得 Style 物件的參考,該物件定義 [下一步]Next 按鈕的設定。

StepNextButtonText

取得或設定 [下一步] 按鈕的顯示文字標題。

StepNextButtonType

取得或設定呈現為 [下一步] 按鈕的按鈕類型。

StepPreviousButtonImageUrl

取得或設定 [上一步] 按鈕的顯示影像 URL。

StepPreviousButtonStyle

取得 Style 物件的參考,該物件定義 [上一步] 按鈕的設定。

StepPreviousButtonText

取得或設定 [上一步] 按鈕的顯示文字標題。

StepPreviousButtonType

取得或設定呈現為 [上一步] 按鈕的按鈕類型。

StepStyle

取得 Style 物件的參考,該物件會定義 WizardStep 物件的設定。

Style

取得文字屬性的集合,將呈現為 Web 伺服器控制項的外部標記上的樣式屬性。

(繼承來源 WebControl)
SupportsDisabledAttribute

取得值,這個值表示當控制項的 disabled 屬性為 IsEnabled 時,控制項是否應該將呈現之 HTML 項目的 false 屬性設為 "disabled"。

(繼承來源 CompositeControl)
TabIndex

取得或設定 Web 伺服器控制項的定位索引。

(繼承來源 WebControl)
TagKey

取得對應至 HtmlTextWriterTag 控制項的 Wizard 值。

TagName

取得控制項標記的名稱。 這個屬性主要由控制項開發人員使用。

(繼承來源 WebControl)
TemplateControl

取得或設定包含了此控制項之樣板的參考。

(繼承來源 Control)
TemplateSourceDirectory

取得包含目前伺服器控制項的 PageUserControl 的虛擬目錄。

(繼承來源 Control)
ToolTip

取得或設定當滑鼠指標停留在 Web 伺服器控制項時顯示的文字。

(繼承來源 WebControl)
UniqueID

取得伺服器控制項唯一的、符合階層架構的識別項。

(繼承來源 Control)
ValidateRequestMode

取得或設定值,指出控制項是否對來自瀏覽器的用戶端輸入檢查潛在的危險值。

(繼承來源 Control)
ViewState

取得狀態資訊的字典,允許您在相同網頁的多個要求之間,儲存和還原伺服器控制項的檢視狀態。

(繼承來源 Control)
ViewStateIgnoresCase

取得值,指出 StateBag 物件是否不區分大小寫。

(繼承來源 Control)
ViewStateMode

取得或設定這個控制項的檢視狀態模式。

(繼承來源 Control)
Visible

取得或設定值,指出伺服器控制項是否會轉譯為頁面上的 UI。

(繼承來源 Control)
Width

取得或設定 Web 伺服器控制項的寬度。

(繼承來源 WebControl)
WizardSteps

取得包含所有為控制項所定義之 WizardStepBase 物件的集合。

方法

AddAttributesToRender(HtmlTextWriter)

將需要呈現的 HTML 屬性和樣式加入至指定的 HtmlTextWriterTag 中。 這個方法主要由控制項開發人員使用。

(繼承來源 WebControl)
AddedControl(Control, Int32)

在子控制項加入 Control 物件的 Controls 集合後呼叫。

(繼承來源 Control)
AddParsedSubObject(Object)

通知伺服器控制項,XML 或 HTML 項目已剖析,並將項目加入伺服器控制項的 ControlCollection 物件中。

(繼承來源 Control)
AllowNavigationToStep(Int32)

使用布林值來判斷 ActiveStep 屬性是否可以設定為 WizardStepBase 物件,該物件對應至傳入的索引。

ApplyStyle(Style)

將指定樣式的任何非空白項目加入到 Web 控制項中,覆寫控制項的任何現有的樣式項目。 這個方法主要由控制項開發人員使用。

(繼承來源 WebControl)
ApplyStyleSheetSkin(Page)

將頁面樣式表中所定義的樣式屬性套用至控制項。

(繼承來源 Control)
BeginRenderTracing(TextWriter, Object)

開始進行轉譯資料的設計階段追蹤。

(繼承來源 Control)
BuildProfileTree(String, Boolean)

收集伺服器控制項的相關資訊,並在頁面啟用追蹤時將此資訊傳遞至 Trace 屬性以顯示之。

(繼承來源 Control)
ClearCachedClientID()

將快取的 ClientID 值設定為 null

(繼承來源 Control)
ClearChildControlState()

刪除伺服器控制項之子控制項的控制項狀態資訊。

(繼承來源 Control)
ClearChildState()

刪除所有伺服器控制項之子控制項的檢視狀態和控制項狀態資訊。

(繼承來源 Control)
ClearChildViewState()

刪除所有伺服器控制項之子控制項的檢視狀態資訊。

(繼承來源 Control)
ClearEffectiveClientIDMode()

將目前的控制項執行個體和任何子控制項的 ClientIDMode 屬性設定為 Inherit

(繼承來源 Control)
CopyBaseAttributes(WebControl)

將不被 Style 物件封裝的屬性從指定的 Web 伺服器控制項複製到呼叫這個方法的 Web 伺服器控制項上。 這個方法主要由控制項開發人員使用。

(繼承來源 WebControl)
CreateChildControls()

建立子控制項。

CreateControlCollection()

建立控制項集合。

CreateControlHierarchy()

建立組成控制項的子控制項階層。

CreateControlStyle()

建立控制項樣式。

DataBind()

繫結資料來源至 CompositeControl 以及其所有子控制項。

(繼承來源 CompositeControl)
DataBind(Boolean)

使用會引發 DataBinding 事件的選項,繫結資料來源至叫用的伺服器控制項及其所有子控制項。

(繼承來源 Control)
DataBindChildren()

繫結資料來源至伺服器控制項的子控制項。

(繼承來源 Control)
Dispose()

啟用伺服器控制項,在它從記憶體釋放之前執行最後清除。

(繼承來源 Control)
EndRenderTracing(TextWriter, Object)

結束轉譯資料的設計階段追蹤。

(繼承來源 Control)
EnsureChildControls()

判斷伺服器控制項是否包含子控制項。 如果不包含,則建立子控制項。

(繼承來源 Control)
EnsureID()

為尚未指定識別項的控制項,建立識別項。

(繼承來源 Control)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
FindControl(String)

在目前命名容器搜尋具有指定 id 參數的伺服器控制項。

(繼承來源 Control)
FindControl(String, Int32)

使用指定的 id 和有助於搜尋之 pathOffset 參數中所指定的整數,在目前的命名容器中搜尋伺服器控制項。 您不應該覆寫這個版本的 FindControl 方法。

(繼承來源 Control)
Focus()

設定控制項的輸入焦點。

(繼承來源 Control)
GetDesignModeState()

取得設計模式狀態。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetHistory()

傳回已存取之 WizardStepBase 物件的集合。

GetRouteUrl(Object)

取得會對應於一組路由參數的 URL。

(繼承來源 Control)
GetRouteUrl(RouteValueDictionary)

取得會對應於一組路由參數的 URL。

(繼承來源 Control)
GetRouteUrl(String, Object)

取得 URL,此 URL 對應於一組路由參數及一個路由名稱。

(繼承來源 Control)
GetRouteUrl(String, RouteValueDictionary)

取得 URL,此 URL 對應於一組路由參數及一個路由名稱。

(繼承來源 Control)
GetStepType(WizardStepBase, Int32)

傳回指定之 WizardStepType 物件的 WizardStepBase 值。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
GetUniqueIDRelativeTo(Control)

傳回指定之控制項 UniqueID 屬性的前置部分。

(繼承來源 Control)
HasControls()

判斷伺服器控制項是否包含任何子控制項。

(繼承來源 Control)
HasEvents()

傳回值,指出控制項或任何子控制項的事件是否已註冊。

(繼承來源 Control)
IsLiteralContent()

判斷伺服器控制項是否只儲存常值內容。

(繼承來源 Control)
LoadControlState(Object)

還原控制項狀態資訊。

LoadViewState(Object)

載入檢視狀態資訊。

MapPathSecure(String)

擷取虛擬絕對路徑或相對路徑所對應至的實體路徑。

(繼承來源 Control)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
MergeStyle(Style)

將指定樣式的任何非空白項目複製到 Web 控制項,但不覆寫控制項的任何現有樣式項目。 這個方法主要由控制項開發人員使用。

(繼承來源 WebControl)
MoveTo(WizardStepBase)

將指定之 WizardStepBase 衍生物件設定為 ActiveStep 控制項的 Wizard 屬性值。

OnActiveStepChanged(Object, EventArgs)

引發 ActiveStepChanged 事件。

OnBubbleEvent(Object, EventArgs)

決定伺服器控制項事件是否要向上傳遞至網頁的使用者介面伺服器控制階層架構。

OnCancelButtonClick(EventArgs)

引發 CancelButtonClick 事件。

OnDataBinding(EventArgs)

引發 DataBinding 事件。

(繼承來源 Control)
OnFinishButtonClick(WizardNavigationEventArgs)

引發 FinishButtonClick 事件。

OnInit(EventArgs)

引發 Init 事件。

OnLoad(EventArgs)

引發 Load 事件。

(繼承來源 Control)
OnNextButtonClick(WizardNavigationEventArgs)

引發 NextButtonClick 事件。

OnPreRender(EventArgs)

引發 PreRender 事件。

(繼承來源 Control)
OnPreviousButtonClick(WizardNavigationEventArgs)

引發 PreviousButtonClick 事件。

OnSideBarButtonClick(WizardNavigationEventArgs)

引發 SideBarButtonClick 事件。

OnUnload(EventArgs)

引發 Unload 事件。

(繼承來源 Control)
OpenFile(String)

取得用來讀取檔案的 Stream

(繼承來源 Control)
RaiseBubbleEvent(Object, EventArgs)

指派事件的任何來源和它的資訊至控制項的父控制項。

(繼承來源 Control)
RecreateChildControls()

重新建立衍生自 CompositeControl 之控制項的子控制項。

(繼承來源 CompositeControl)
RegisterCommandEvents(IButtonControl)

為指定之 CommandEventHandler 物件註冊 IButtonControl 類別的新執行個體。

RemovedControl(Control)

Control 物件的 Controls 集合中移除子控制項之後呼叫。

(繼承來源 Control)
Render(HtmlTextWriter)

將控制項呈現在指定的寫入器中。

RenderBeginTag(HtmlTextWriter)

將控制項的 HTML 開頭標記呈現在指定的寫入器中。 這個方法主要由控制項開發人員使用。

(繼承來源 WebControl)
RenderChildren(HtmlTextWriter)

將伺服器控制項子系的內容輸出至提供的 HtmlTextWriter 物件,再由這個物件在用戶端上寫入要轉譯的內容。

(繼承來源 Control)
RenderContents(HtmlTextWriter)

將控制項的內容呈現在指定的寫入器。 這個方法主要由控制項開發人員使用。

(繼承來源 WebControl)
RenderControl(HtmlTextWriter)

將伺服器控制項內容輸出至提供的 HtmlTextWriter 物件,並在啟用追蹤時儲存控制項的追蹤資訊。

(繼承來源 Control)
RenderControl(HtmlTextWriter, ControlAdapter)

使用提供的 HtmlTextWriter 物件,輸出伺服器控制項內容至提供的 ControlAdapter 物件。

(繼承來源 Control)
RenderEndTag(HtmlTextWriter)

將控制項的 HTML 結尾標記呈現至指定的寫入器。 這個方法主要由控制項開發人員使用。

(繼承來源 WebControl)
ResolveAdapter()

取得負責呈現指定之控制項的控制項配置器。

(繼承來源 Control)
ResolveClientUrl(String)

取得瀏覽器可使用的 URL。

(繼承來源 Control)
ResolveUrl(String)

將 URL 轉換為要求用戶端可使用的 URL。

(繼承來源 Control)
SaveControlState()

儲存控制項狀態。

SaveViewState()

儲存檢視狀態。

SetDesignModeState(IDictionary)

設定控制項的設計階段資料。

(繼承來源 Control)
SetRenderMethodDelegate(RenderMethod)

指定事件處理常式委派,以呈現伺服器控制項及其內容至其父控制項。

(繼承來源 Control)
SetTraceData(Object, Object)

使用追蹤資料機碼和追蹤資料值,設定設計階段期間追蹤呈現資料的追蹤資料。

(繼承來源 Control)
SetTraceData(Object, Object, Object)

使用追蹤的物體、追蹤資料機碼和追蹤資料值,設定設計階段期間追蹤呈現資料的追蹤資料。

(繼承來源 Control)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
TrackViewState()

追蹤檢視狀態。

事件

ActiveStepChanged

在使用者切換至控制項中的新步驟時發生。

CancelButtonClick

在按一下 [取消] 按鈕時發生。

DataBinding

發生於伺服器控制項繫結至資料來源時。

(繼承來源 Control)
Disposed

發生於伺服器控制項從記憶體釋放時,這是在要求 ASP.NET 網頁時,伺服器控制項生命週期的最後階段。

(繼承來源 Control)
FinishButtonClick

在按一下 [完成] 按鈕時發生。

Init

發生於初始化伺服器控制項時,是其生命週期中的第一個步驟。

(繼承來源 Control)
Load

發生於載入伺服器控制項至 Page 物件時。

(繼承來源 Control)
NextButtonClick

在按 [下一步] 按鈕時發生。

PreRender

Control 物件載入之後但在呈現之前發生。

(繼承來源 Control)
PreviousButtonClick

在按一下 [上一步] 按鈕時發生。

SideBarButtonClick

在按一下提要欄位區域中的按鈕時發生。

Unload

發生於伺服器控制項從記憶體卸載時。

(繼承來源 Control)

明確介面實作

IAttributeAccessor.GetAttribute(String)

使用指定的名稱,取得 Web 控制項的屬性。

(繼承來源 WebControl)
IAttributeAccessor.SetAttribute(String, String)

將 Web 控制項的屬性設定為指定的名稱和值。

(繼承來源 WebControl)
ICompositeControlDesignerAccessor.RecreateChildControls()

讓設計工具能在設計階段環境中重新建立複合控制項的子控制項集合。

(繼承來源 CompositeControl)
IControlBuilderAccessor.ControlBuilder

如需這個成員的說明,請參閱 ControlBuilder

(繼承來源 Control)
IControlDesignerAccessor.GetDesignModeState()

如需這個成員的說明,請參閱 GetDesignModeState()

(繼承來源 Control)
IControlDesignerAccessor.SetDesignModeState(IDictionary)

如需這個成員的說明,請參閱 SetDesignModeState(IDictionary)

(繼承來源 Control)
IControlDesignerAccessor.SetOwnerControl(Control)

如需這個成員的說明,請參閱 SetOwnerControl(Control)

(繼承來源 Control)
IControlDesignerAccessor.UserData

如需這個成員的說明,請參閱 UserData

(繼承來源 Control)
IDataBindingsAccessor.DataBindings

如需這個成員的說明,請參閱 DataBindings

(繼承來源 Control)
IDataBindingsAccessor.HasDataBindings

如需這個成員的說明,請參閱 HasDataBindings

(繼承來源 Control)
IExpressionsAccessor.Expressions

如需這個成員的說明,請參閱 Expressions

(繼承來源 Control)
IExpressionsAccessor.HasExpressions

如需這個成員的說明,請參閱 HasExpressions

(繼承來源 Control)
IParserAccessor.AddParsedSubObject(Object)

如需這個成員的說明,請參閱 AddParsedSubObject(Object)

(繼承來源 Control)

擴充方法

FindDataSourceControl(Control)

傳回與指定之控制項的資料控制項相關聯的資料來源。

FindFieldTemplate(Control, String)

傳回在指定之控制項的命名容器中所指定資料行的欄位樣板。

FindMetaTable(Control)

傳回包含資料控制項的中繼資料表物件。

GetDefaultValues(INamingContainer)

取得所指定資料控制項的預設值集合。

GetMetaTable(INamingContainer)

取得所指定資料控制項中的資料表中繼資料。

SetMetaTable(INamingContainer, MetaTable)

設定所指定資料控制項中的資料表中繼資料。

SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>)

設定所指定資料控制項的資料表中繼資料及預設值對應。

SetMetaTable(INamingContainer, MetaTable, Object)

設定所指定資料控制項的資料表中繼資料及預設值對應。

TryGetMetaTable(INamingContainer, MetaTable)

判斷資料表中繼資料是否可供使用。

EnableDynamicData(INamingContainer, Type)

針對指定的資料控制項啟用動態資料行為。

EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>)

針對指定的資料控制項啟用動態資料行為。

EnableDynamicData(INamingContainer, Type, Object)

針對指定的資料控制項啟用動態資料行為。

適用於

另請參閱