2012-11-21 103 views
2

我想在左欄中隱藏步驟名稱。不想看到'Wizardstep1','Wizardstep2'和'Wizardstep3'。有人可以告訴我如何做到這一點?如何隱藏asp.net嚮導控件的步驟名稱?

enter image description here

 <asp:Wizard runat="server" ID="MyWizard" OnNextButtonClick="MyWizard_NextButtonClick" 
         Width="640px" Height="200px" OnFinishButtonClick="MyWizard_FinishButtonClick"> 
         <WizardSteps> 
         <asp:WizardStep ID="Wizardstep1" runat="server" StepType="Start"> 
         </asp:WizardStep> 
         <asp:WizardStep ID="Wizardstep2" runat="server" StepType="Step"> 
         </asp:WizardStep> 
         <asp:WizardStep ID="Wizardstep3" runat="server" StepType="Finish"> 
         </asp:WizardStep> 
    </asp:Wizard> 

回答

4

有一個屬性DisplaySideBar,你可以設置爲false。

<asp:Wizard runat="server" DisplaySideBar="false" ID="MyWizard" OnNextButtonClick="MyWizard_NextButtonClick" Width="640px" Height="200px" OnFinishButtonClick="MyWizard_FinishButtonClick"> 
    .... 
</asp:Wizard> 

此外,可以爲其設置自定義模板。也許你可以將其設置爲空,如果上面的方法沒有奏效:

<asp:Wizard runat="server" ID="MyWizard" OnNextButtonClick="MyWizard_NextButtonClick" Width="640px" Height="200px" OnFinishButtonClick="MyWizard_FinishButtonClick"> 
    <sidebartemplate> 
    </sidebartemplate> 
    .... 
</asp:Wizard> 
2

嘗試設置:

<asp:WizardStep Title=""></asp:WizardStep> 

此外,DisplaySideBar="false"

<asp:Wizard DisplaySideBar="false"></asp:Wizard>