Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I Access ASP.Net Wizard Finish Button in Code?

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.

like image 374
Aaron Avatar asked Feb 19 '10 21:02

Aaron


People also ask

What is wizard control in asp net?

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.

What is a wizard control?

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.

What is wizard in c#?

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.


1 Answers

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");
like image 153
Aaron Avatar answered Oct 01 '22 11:10

Aaron