Unique ID of CreateUSer Button in CreateUserWizard asp.net
-
11-02-2021 - |
Frage
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?
Lösung
I finally found it, its ID is "StepNextButtonButton"
Andere Tipps
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;
}
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow