2012-11-21 2 views
0

는 내가 StepNavigationTemplate을 설정하기 위해 노력하고있어,하지만 그것은 여기 아무것도하지 않는StepNavigationTemplate이 CreateUserWizard에서 작동하지 않습니까?

<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"> 
    <StepNavigationTemplate> 
     <asp:Button ID="StepPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious" Text="Cancel" /> 
     <asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" Text="I Agree" /> 
    </StepNavigationTemplate> 
    <WizardSteps> 
     <asp:WizardStep runat="server" Title="Agree to Terms of Use"> 
     </asp:WizardStep> 
    </WizardSteps> 
</asp:CreateUserWizard> 

작동하지 않습니다,하지만 난 그것을 작동하는 <asp:WizardStep> 안에 넣어 때,하지만 그것을 탐색 버튼과 이전에 추가 그것들은 여전히 ​​존재하므로, 전혀 유용하지 않습니다. 어떻게 사용 되나요?

답변

0

은이 같은 것을 의미합니까 : 내 코드 샘플 내 질문에 표시되지 않은 어떤 이유로

<WizardSteps> 
<asp:WizardStep runat="server" Title="Your title" ID="wzsStep" StepType="Step"></asp:WizardStep > 
..... 
</WizardSteps> 
<StepNavigationTemplate> 

         <asp:Button ID="uxPreviousStepBtn" Text="Previous" runat="server" CausesValidation="False" 
          Width="80" OnClick="uxPreviousStepBtn_Click" OnPreRender="uxPreviosStepBtn_PreRender" /> 

         <asp:Button ID="uxNextStepBtn" Text="Next" runat="server" CausesValidation="True" 
          Width="80" ValidationGroup="MainData" OnClick="uxNextStepBtn_Click" OnPreRender="uxNextStepBtn_PreRender" /> 


      </StepNavigationTemplate> 

protected void uxPreviousStepBtn_Click(object sender, EventArgs e) 
{ 
//Previous step will show 
myWizard.ActiveStepIndex =myWizard.ActiveStepIndex>0? myWizard.ActiveStepIndex-1:0; 
}   
protected void uxNextStepBtn_PreRender(object sender, EventArgs e) 
    { 
    //Check please if next step exists 
      myWizard.ActiveStepIndex =myWizard.ActiveStepIndex+1; 
    } 
+0

을 .. 그러나 그것은 지금이다. 추가 코드/기능이 필요합니까? 나는 단순히 템플릿이 기본 단계 템플릿을 덮어 쓰기 만한다는 인상을 받고있었습니다 (문서가 의미하는 것처럼 보입니다) – Damon