开发者

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

开发者 https://www.devze.com 2022-12-21 04:11 出处:网络
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 comple

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.


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");
0

精彩评论

暂无评论...
验证码 换一张
取 消