<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>
<%@ Page Language="VB" %> <script runat="server"> Sub Wizard1_NextButtonClick(sender As Object, e As System.Web.UI.WebControls.WizardNavigationEventArgs) If (e.NextStepIndex = 3) Then If (rdoType1.Checked = True) Then Wizard1.ActiveStepIndex = 3 Else Wizard1.ActiveStepIndex = 4 End If End If End Sub Sub Wizard1_FinishButtonClick(sender As Object, e As System.Web.UI.WebControls.WizardNavigationEventArgs) Me.lblText1.Text = "<hr>Sawatdee " & Me.txtFirstName.Text & " " & Me.txtLastName.Text End Sub </script> <html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <form id="form1" runat="server"> <asp:Wizard ID="Wizard1" runat="server" Width="500px" ActiveStepIndex="0" OnNextButtonClick="Wizard1_NextButtonClick" OnFinishButtonClick="Wizard1_FinishButtonClick"> <WizardSteps> <asp:WizardStep ID="WizardStep1" runat="server" Title="1. Name Information"> First Name :<br /> <asp:TextBox ID="txtFirstName" runat="server" Width="184px"></asp:TextBox> <br /> Last Name :<br /> <asp:TextBox ID="txtLastName" runat="server" Width="184px"></asp:TextBox> </asp:WizardStep> <asp:WizardStep ID="WizardStep2" runat="server" Title="2. Email"> Enter Your Email<br /> <asp:TextBox ID="txtEmail" runat="server" Width="184px"></asp:TextBox> </asp:WizardStep> <asp:WizardStep ID="WizardStep3" runat="server" Title="3. Auth Type"> Auth Type<br /> <asp:RadioButton ID="rdoType1" runat="server" Text="Password" GroupName="AuthType" Checked /> <asp:RadioButton ID="rdoType2" runat="server" Text="Text" GroupName="AuthType" /> </asp:WizardStep> <asp:WizardStep ID="WizardStep4" runat="server" Title="4. Auth Password"> (Auth Password) Password:<br /> <asp:TextBox ID="txtPassword1" runat="server" TextMode="Password" Width="192px"></asp:TextBox><br /> <asp:TextBox ID="txtPassword2" runat="server" TextMode="Password" Width="192px"></asp:TextBox> </asp:WizardStep> <asp:WizardStep ID="WizardStep5" runat="server" Title="5. Auth Text"> (Auth Text) Text :<br /> <asp:TextBox ID="Text" runat="server" TextMode="Password" Width="192px"></asp:TextBox> </asp:WizardStep> </WizardSteps> </asp:Wizard> <asp:Label id="lblText1" runat="server"></asp:Label> </form> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท