I have an asp.net wizard control with the "finish" button defined in the FinishNavigationTemplate
. I would like to access that button in code to give it focus if finishing the wizard does not complete.
I've tried doing a FindControl on the WizardStep like so:
Button b = (Button) wsReviewOrder.FindControl("FinishButton");
I've tried doing a FindControl on the entire Wizard control like so:
Button b = (Button) wCheckout.FindControl("FinishButton");
Neither of these worked for me.
The Wizard Control in ASP.NET 2.0. The ASP.NET Wizard control simplifies many of the tasks associated with building a series of forms to collect user data. The control provides a mechanism that allows you to easily build the desired wizard as a collection of steps, add a new step, or reorder the steps.
The WizardControl is a rich interactive and customizable interface that holds many pages together that helps to break up a complex task and guides the end user through a set of simple procedures to perform or to obtain data that are categorically divided in every page.
Wizard control eliminates the need to design forms to execute a step by step process in the actual business flow. This simplifies the work of developers to design and write the code.
I ran across this post which helped me get the answer:
http://forums.asp.net/t/903710.aspx
This is what worked for me:
Button b = (Button)wCheckout.FindControl("FinishNavigationTemplateContainerID").FindControl("FinishButton");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With