Wizard 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供导航和用户界面(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 移动 Finish。
Finish在步骤中,用户可以选择通过单击 GoBackButton 返回控件的Wizard开头;但是,它采用该用户,Step2因为AllowReturn该Step1属性设置为 false。
重要
此示例有一个接受用户输入的文本框,这是潜在的安全威胁。 默认情况下,ASP.NET 网页验证用户输入是否不包含脚本或 HTML 元素。 有关详细信息,请参阅 脚本攻击概述。
<%@ 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,应将对象的false属性WizardStepBase设置为AllowReturn使用户无法在提交之前完成的步骤中返回并更改数据。
向导命令名称
该Wizard控件从View类和MultiView类继承以下命令名称:NextViewCommandName、PreviousViewCommandName、和SwitchViewByIDCommandNameSwitchViewByIndexCommandName。 向导控件会忽略这些命令名称,并且不包含任何特殊逻辑,使这些命令能够自动用于导航。 如果从控件中的 Wizard 按钮中删除或缺少命令名称,则不会引发异常。 例如,如果 StartNavigationTemplate 按钮缺少值 CommandName,则不会引发异常。
动态更改步骤
可以使用 MoveTo 该方法或 ActiveStepIndex 属性动态更改控件中 Wizard 当前显示的步骤。
注释
如果在事件处理程序中Page_Load以编程方式添加 aWizardStep,则必须在页面加载之前将导航添加到该步骤。
向导外观
控件的外观 Wizard 可通过模板、外观和样式设置完全自定义。 例如,可以使用HeaderTemplate控件SideBarTemplateStartNavigationTemplate的接口、属性FinishNavigationTemplate和StepNavigationTemplate属性来自定义控件的Wizard接口。
注释
FinishNavigationTemplate设置、HeaderTemplateDisplaySideBar、、SideBarTemplateStartNavigationTemplate或StepNavigationTemplate属性可重新创建控件的Wizard子控件。 因此,子控件的视图状态在进程中丢失。 为了避免这种情况,请显式维护控件的子控件的 Wizard 控件状态,或避免将控件置于模板内部。
请注意,该 Wizard 控件不支持非标准模式或怪癖模式的特殊Microsoft Internet Explorer 呈现。 若要使用 Wizard 控件获取最佳 Internet Explorer 呈现,请使用默认情况下在 Visual Web 开发人员和 Visual Studio 中添加的 XHTML 文档类型。
使用布局模板设置格式
该 Wizard 控件允许你指定控件的布局,而无需使用 HTML table 元素。 相反,可以使用 LayoutTemplate 元素来指定布局。 在模板中,创建占位符控件以指示应在控件中动态插入项的位置。 (这类似于控件的 ListView 模板模型的工作原理。有关详细信息,请参阅属性 Wizard.LayoutTemplate 。
可及性
有关如何配置此控件以便生成符合辅助功能标准的标记的信息,请参阅 Visual Studio 中的辅助功能以及 ASP.NET 和 ASP.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 |
获取控件中Wizard占位符的 HeaderTemplate ID。 |
| MoveCompleteCommandName |
检索与 “完成 ”按钮关联的命令名称。 此字段是静态字段和只读字段。 |
| MoveNextCommandName |
检索与 “下一步 ”按钮关联的命令名称。 此字段是静态字段和只读字段。 |
| MovePreviousCommandName |
检索与 上一 个按钮关联的命令名称。 此字段是静态字段和只读字段。 |
| MoveToCommandName |
检索与每个边栏按钮关联的命令名称。 此字段是静态字段和只读字段。 |
| NavigationPlaceholderId |
获取控件中Wizard占位符的 StartNavigationTemplate ID。 |
| SideBarButtonID |
检索与每个边栏按钮关联的标识符。 此字段是静态字段和只读字段。 |
| SideBarPlaceholderId |
获取控件中Wizard占位符的 SideBarTemplate ID。 |
| StartNextButtonID |
检索与步骤上的Start“下一步”按钮关联的标识符。 此字段是静态字段和只读字段。 |
| StepNextButtonID |
检索与 “下一步 ”按钮关联的标识符。 此字段是静态字段和只读字段。 |
| StepPreviousButtonID |
检索与 上一 个按钮关联的标识符。 此字段是静态字段和只读字段。 |
| WizardStepPlaceholderId |
获取控件中Wizard占位符的 WizardStep ID。 |
属性
| 名称 | 说明 |
|---|---|
| AccessKey |
获取或设置访问密钥,使你能够快速导航到 Web 服务器控件。 (继承自 WebControl) |
| ActiveStep |
获取当前向用户显示的集合中的 WizardSteps 步骤。 |
| ActiveStepIndex |
获取或设置当前 WizardStepBase 对象的索引。 |
| Adapter |
获取控件的特定于浏览器的适配器。 (继承自 Control) |
| AppRelativeTemplateSourceDirectory |
获取或设置包含此控件的 Page 或 UserControl 对象的应用程序相对虚拟目录。 (继承自 Control) |
| Attributes |
获取不对应于控件上的属性的任意属性(仅用于呈现)的集合。 (继承自 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 标记的控件 ID。 (继承自 Control) |
| ClientIDMode |
获取或设置用于生成属性值的 ClientID 算法。 (继承自 Control) |
| ClientIDSeparator |
获取一个表示属性中使用的 ClientID 分隔符的字符值。 (继承自 Control) |
| Context |
HttpContext获取与当前 Web 请求的服务器控件关联的对象。 (继承自 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 |
获取控件的事件处理程序委托的列表。 此属性为只读。 (继承自 Control) |
| FinishCompleteButtonImageUrl |
获取或设置为 “完成” 按钮显示的图像的 URL。 |
| FinishCompleteButtonStyle |
获取对定义Style“完成”按钮设置的对象的引用。 |
| FinishCompleteButtonText |
获取或设置为 “完成” 按钮显示的文本标题。 |
| FinishCompleteButtonType |
获取或设置呈现为 “完成 ”按钮的按钮的类型。 |
| FinishDestinationPageUrl |
获取或设置用户在单击“ 完成 ”按钮时重定向到的 URL。 |
| FinishNavigationTemplate |
获取或设置用于在步骤上 Finish 显示导航区域的模板。 |
| FinishPreviousButtonImageUrl |
获取或设置步骤上Finish一按钮显示的图像的 URL。 |
| FinishPreviousButtonStyle | |
| 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 | |
| StartNextButtonImageUrl |
获取或设置步骤上Start“下一步”按钮显示的图像的 URL。 |
| StartNextButtonStyle | |
| StartNextButtonText |
获取或设置步骤上Start“下一步”按钮显示的文本标题。 |
| StartNextButtonType |
获取或设置在步骤中Start呈现为“下一步”按钮的按钮类型。 |
| StepNavigationTemplate |
获取或设置用于在除 、Finish或Complete步骤以外的Start任何WizardStepBase派生对象上显示导航区域的模板。 |
| StepNextButtonImageUrl |
获取或设置为 “下一步 ”按钮显示的图像的 URL。 |
| StepNextButtonStyle |
获取对 Style 定义 “下一步 ”按钮设置的对象的引用。 |
| StepNextButtonText |
获取或设置为 “下一步” 按钮显示的文本标题。 |
| StepNextButtonType |
获取或设置呈现为 “下一步 ”按钮的按钮的类型。 |
| StepPreviousButtonImageUrl |
获取或设置为 上一 个按钮显示的图像的 URL。 |
| StepPreviousButtonStyle |
获取对定义上一Style按钮设置的对象的引用。 |
| StepPreviousButtonText |
获取或设置为 上一 个按钮显示的文本标题。 |
| StepPreviousButtonType |
获取或设置呈现为 上一 按钮的按钮的类型。 |
| StepStyle |
获取对定义 Style 对象设置的对象的 WizardStep 引用。 |
| Style |
获取文本属性的集合,该属性将在 Web 服务器控件的外部标记上呈现为样式属性。 (继承自 WebControl) |
| SupportsDisabledAttribute |
获取一个值,该值指示当控件的属性为控件的属性时,控件是否应将呈现的 IsEnabled HTML 元素的属性 |
| TabIndex |
获取或设置 Web 服务器控件的选项卡索引。 (继承自 WebControl) |
| TagKey |
HtmlTextWriterTag获取与Wizard控件对应的值。 |
| TagName |
获取控件标记的名称。 此属性主要由控件开发人员使用。 (继承自 WebControl) |
| TemplateControl |
获取或设置对包含此控件的模板的引用。 (继承自 Control) |
| TemplateSourceDirectory |
获取包含当前服务器控件的 Page 虚拟 UserControl 目录。 (继承自 Control) |
| ToolTip |
获取或设置鼠标指针悬停在 Web 服务器控件上时显示的文本。 (继承自 WebControl) |
| UniqueID |
获取服务器控件的唯一分层限定标识符。 (继承自 Control) |
| ValidateRequestMode |
获取或设置一个值,该值指示控件是否检查浏览器的客户端输入是否存在潜在危险值。 (继承自 Control) |
| ViewState |
获取状态信息的字典,该字典允许跨同一页的多个请求保存和还原服务器控件的视图状态。 (继承自 Control) |
| ViewStateIgnoresCase |
获取一个值,该值指示对象是否 StateBag 不区分大小写。 (继承自 Control) |
| ViewStateMode |
获取或设置此控件的视图状态模式。 (继承自 Control) |
| Visible |
获取或设置一个值,该值指示服务器控件是否呈现为页面上的 UI。 (继承自 Control) |
| Width |
获取或设置 Web 服务器控件的宽度。 (继承自 WebControl) |
| WizardSteps |
获取一个集合,其中包含为控件定义的所有 WizardStepBase 对象。 |
方法
活动
| 名称 | 说明 |
|---|---|
| ActiveStepChanged |
当用户切换到控件中的新步骤时发生。 |
| CancelButtonClick |
单击“ 取消 ”按钮时发生。 |
| DataBinding |
当服务器控件绑定到数据源时发生。 (继承自 Control) |
| Disposed |
在从内存中释放服务器控件时发生,这是请求 ASP.NET 页时服务器控件生命周期的最后阶段。 (继承自 Control) |
| FinishButtonClick |
单击“ 完成 ”按钮时发生。 |
| Init |
在初始化服务器控件时发生,这是其生命周期中的第一步。 (继承自 Control) |
| Load |
在将服务器控件加载到对象中 Page 时发生。 (继承自 Control) |
| NextButtonClick |
单击“ 下一步 ”按钮时发生。 |
| PreRender |
在 Control 加载对象但在呈现之前发生。 (继承自 Control) |
| PreviousButtonClick |
单击 “上一个 ”按钮时发生。 |
| SideBarButtonClick |
单击边栏区域中的按钮时发生。 |
| Unload |
从内存中卸载服务器控件时发生。 (继承自 Control) |
显式接口实现
扩展方法
| 名称 | 说明 |
|---|---|
| EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>) |
为指定的数据控件启用动态数据行为。 |
| EnableDynamicData(INamingContainer, Type, Object) |
为指定的数据控件启用动态数据行为。 |
| EnableDynamicData(INamingContainer, Type) |
为指定的数据控件启用动态数据行为。 |
| FindDataSourceControl(Control) |
返回与指定控件的数据控件关联的数据源。 |
| FindFieldTemplate(Control, String) |
返回指定控件命名容器中指定列的字段模板。 |
| FindMetaTable(Control) |
返回包含数据控件的元表对象。 |
| GetDefaultValues(INamingContainer) |
获取指定数据控件的默认值的集合。 |
| GetMetaTable(INamingContainer) |
获取指定数据控件的表元数据。 |
| SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>) |
设置指定数据控件的表元数据和默认值映射。 |
| SetMetaTable(INamingContainer, MetaTable, Object) |
设置指定数据控件的表元数据和默认值映射。 |
| SetMetaTable(INamingContainer, MetaTable) |
设置指定数据控件的表元数据。 |
| TryGetMetaTable(INamingContainer, MetaTable) |
确定表元数据是否可用。 |