Este artigo foi traduzido por máquina. Para visualizar o arquivo em inglês, marque a caixa de seleção Inglês. Você também pode exibir o texto Em inglês em uma janela pop-up, movendo o ponteiro do mouse sobre o texto.
Tradução
Inglês

Propriedade Wizard.FinishNavigationTemplate

 

Obtém ou define o modelo usado para exibir a área de navegação na etapa Finish.

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

[BrowsableAttribute(false)]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[TemplateContainerAttribute(typeof(Wizard))]
public virtual ITemplate FinishNavigationTemplate { get; set; }

Valor da Propriedade

Type: System.Web.UI.ITemplate

O ITemplate que define o conteúdo para a área de navegação do Finish no Wizard. O padrão é null.

Use the P:System.Web.UI.WebControls.Wizard.FinishNavigationTemplate property to specify the custom content that is displayed for the navigation area on the F:System.Web.UI.WebControls.WizardStepType.Finish step of the T:System.Web.UI.WebControls.Wizard control. Define the content by creating a template that specifies how the navigation area is rendered on the F:System.Web.UI.WebControls.WizardStepType.Finish step.

The custom content for the template is contained within the P:System.Web.UI.WebControls.Wizard.FinishNavigationTemplate object. You can add custom content to the P:System.Web.UI.WebControls.Wizard.FinishNavigationTemplate object either by using template-editing mode in design view or by defining the P:System.Web.UI.WebControls.Wizard.FinishNavigationTemplate object inline using FinishNavigationTemplate tags. The content can be as simple as plain text or more complex (embedding other controls in the template, for example).

System_CAPS_noteObservação

The P:System.Web.UI.WebControls.Wizard.FinishNavigationTemplate object that is contained in the P:System.Web.UI.WebControls.Wizard.FinishNavigationTemplate property must contain two T:System.Web.UI.WebControls.IButtonControl controls, one with its P:System.Web.UI.WebControls.IButtonControl.CommandName property set to "MoveComplete" and the other with its P:System.Web.UI.WebControls.IButtonControl.CommandName property set to "MovePrevious", to enable the navigation feature.

To access a control that is defined in a template programmatically, use the P:System.Web.UI.WebControls.CompositeControl.Controls collection of the T:System.Web.UI.WebControls.Wizard object. You can also use the Overload:System.Web.UI.Control.FindControl method of the T:System.Web.UI.WebControls.Wizard object to find the control, if the control has an P:System.Web.UI.Control.ID property specified.

The following code example demonstrates how to use the P:System.Web.UI.WebControls.Wizard.FinishNavigationTemplate property to create a custom template for the navigation area of the F:System.Web.UI.WebControls.WizardStepType.Finish step for the T:System.Web.UI.WebControls.Wizard control.

System_CAPS_security Segurança Observação

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

<%@ 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">

  void OnFinishButtonClick(object sender, EventArgs e)
  {
    // Insert code here that determines if an email address was
    // entered in emailTextBox. Then send an confirmation email if it was.     
  }

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" 
      title="FinishNavigationTemplate Example" 
      runat="server">
      <asp:Wizard ID="Wizard1" 
        Runat="server" 
        ActiveStepIndex="0" 
        OnFinishButtonClick="OnFinishButtonClick">
        <WizardSteps>
          <asp:WizardStep Runat="server" 
            Title="Step 1">
            <!-- Put UI elements for Step 1 here. -->
            This is step one.
          </asp:WizardStep>
          <asp:WizardStep Runat="server" 
            Title="Step 2">
            <!-- Put UI elements for Step 2 here. -->
            This is step two.
          </asp:WizardStep>
          <asp:WizardStep Runat="server" 
            StepType="Complete" 
            Title="Complete">
            The Wizard has been completed.
          </asp:WizardStep>
        </WizardSteps>
        <FinishNavigationTemplate>
          Please enter your email address if you would like a confirmation email:
          <asp:TextBox ID="emailTextBox" 
            Runat="server">
          </asp:TextBox>
          &nbsp;<br />
          <asp:Button CommandName="MovePrevious"
              Runat="server" 
              Text="Previous" />
          <asp:Button CommandName="MoveComplete" 
            Runat="server" 
            Text="Finish" />
        </FinishNavigationTemplate>
        <HeaderTemplate>
          <b>FinishNavigationTemplate Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>

.NET Framework
Disponível desde 2.0
Retornar ao início
Mostrar: