Reputation: 1474
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.
Upvotes: 6
Views: 9139
Reputation: 1474
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");
Upvotes: 7