find button in asp.net wizard

M

Mike

I have a web page that is using the asp.net wizard control. On this wizard, there is a next, cancel buttons, how can I find these buttons in this wizard.

If I do something like this
TemplatedWizardStep tws = (TemplatedWizardStep)Wizard1.WizardSteps[5];
Button btn = (Button)tws.CustomNavigationTemplateContainer.FindControl("Button6");
btn.visible = false;

- button6 is the name of the button I want to hide.

I keep getting:
Object referenec not set to an instance of an object,



though my button is on the screen and I can see it, why can't I hide it when I click on another button?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top