Pregunta

I made a custom FindControl function to find a control within all childs of one control I pass in parameter. But I don't manage to have a hand over the button used to create a user ,in a CreateUserWizard Control.

I kept the default style, do anyone knows the name (ID) of this button?

I saw buttons like "ContinueButtonButton", "FinishButton", but they don't seem to be the one I am searching for, because I then have this line:

        this.Form.DefaultButton = Tools.FindControl(CreateUserWizard1, "FinishButton").UniqueID;

And the create user event is not fired when I hit enter.

Any idea?

¿Fue útil?

Solución

I finally found it, its ID is "StepNextButtonButton"

Otros consejos

how about try something like

    foreach (Control ctrl in this.form1.Controls)
    {
        if (ctrl.GetType() == typeof(Button) && (ctrl as Button).Text == "Button2")
        {
            this.form1.DefaultButton = ctrl.ID;
        }
    }
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top