<asp:Wizard ID="MyWizard" runat="server">
<StartNavigationTemplate>
<asp:Button ID="btnNext" runat="server" CommandName="MoveNext" Text="Next" />
</StartNavigationTemplate>
</asp:Wizard>
Control startNavigationTemplate = MyWizard.FindControl( "StartNavigationTemplateContainerID" ) as Control;
if ( startNavigationTemplate != null )
{
Button nextButton = startNavigationTemplate.FindControl( "btnNext" ) as Button ;
if ( nextButton != null )
{
// Do something.
}
}
To manipulate buttons in the step and finish navigiation templates, use StepNavigationTemplateContainerID and FinishNavigationTemplateContainerID respectively.
3 comments:
Hey thanks this is much more concise than the other solutions I have found for this problem. Any ideas what the Id of the HeaderTemplate is? I want to modify some content in the HeaderTemplate.
You can use the following code to get control of the HeaderTemplate:
Control header = EcommerceWizard.FindControl( "HeaderContainer" ) as Control;
I have just saved my day! Thank you!
Post a Comment