I'm trying to access the submit button which is part of the PasswordRecovery control within asp.net 2.0. The API as far as I can see does not allow this.
Has anyone any ideas how I can add a Javascript confirmation popup window when clicking this button.
I have tried to add onclick to the attributes of the PasswordRecovery control within the SendingMail event as below but no luck.
protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
//storing audit information
PasswordRecovery myPasswordRecovery = new PasswordRecovery();
myPasswordRecovery = (PasswordRecovery)sender;
myPasswordRecovery.SubmitButton.Attributes.Add("onclick", "return confirm('" + confirmationMessage + "');");
}