开发者

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.


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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜