Unique ID of CreateUserWizard Create User button

  • Thread starter Thread starter oozy
  • Start date Start date
O

oozy

Hi,

I'm currently using

Page.Form.DefaultButton = ChangePassword1.FindControl("xx").UniqueID

to set my DefaultButtons in a form that has multiple wizards(each in
it's own panel). I can find the ID of every wizard I am using except
the "Create User" button of the Create User Wizard. I've tried the
ID, the name, parts of either, but I always get an error in my page
when I try to use the command above for the "Create User" button.

I know this works for other controls in the create user wizard.
Referencing the "User name" control works, as can be seen in the code
below.

If (CreateUserPanel.Visible()) Then Page.Form.DefaultFocus =
CreateUserWizard1.FindControl("CreateUserStepContainer
$UserName").UniqueID

Does anybody know how I can reference the button?

Thanks
 
Turn Trace on in the page and look for the control in the control tree
hierachy. You probably need to use FindControl on another container similar
to something like this...

....FindControl("xx").FindControl("yy");

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
 
If you didn't find this out already using clintonG's suggestion...this should do it:

this.CreateUserWizard1.FindControl("StartNavigationTemplateContainerID").FindControl("StartNextButton").UniqueID;

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
Back
Top