X
xke
Having a Login Control on my page caused an issue when press enter
(after filling out username and pwd fields). I manage to get through
by setting the default button for the page form:
mainForm.DefaultButton = loginbtn.UniqueID.
My problem is now with Password Recovery.
Password Recovery is a bit complicated because it's two parts process.
I want to have the same behaviour, press enter same as click on the
button.
Dim mainform As HtmlForm =
CType(Page.FindControl("form1"), HtmlForm)
mDynamicCtl =
Page.FindControl("idContent_ForgotPassword").FindControl("PasswordRecovery1")
Dim btnFPwd1 As Button =
CType(mDynamicCtl.FindControl("UserNameContainerID").FindControl("SubmitButton"),
Button)
Dim btnFPwd2 As Button =
CType(mDynamicCtl.FindControl("QuestionContainerID").FindControl("SubmitButton"),
Button)
If (Not mainform Is Nothing) And (Not btnFPwd1 Is Nothing)
Then
mainform.DefaultButton = btnFPwd1.UniqueID
End If
btnFPwd1 is the button when entering the UserName
btnFPwd2 is the button when entering the secret answer
Both of these come not null in both situations.
I couldn't find a way to make the difference which one of the buttons
is pressed. How can I figure out the default button?
Any help?
Thanks
(after filling out username and pwd fields). I manage to get through
by setting the default button for the page form:
mainForm.DefaultButton = loginbtn.UniqueID.
My problem is now with Password Recovery.
Password Recovery is a bit complicated because it's two parts process.
I want to have the same behaviour, press enter same as click on the
button.
Dim mainform As HtmlForm =
CType(Page.FindControl("form1"), HtmlForm)
mDynamicCtl =
Page.FindControl("idContent_ForgotPassword").FindControl("PasswordRecovery1")
Dim btnFPwd1 As Button =
CType(mDynamicCtl.FindControl("UserNameContainerID").FindControl("SubmitButton"),
Button)
Dim btnFPwd2 As Button =
CType(mDynamicCtl.FindControl("QuestionContainerID").FindControl("SubmitButton"),
Button)
If (Not mainform Is Nothing) And (Not btnFPwd1 Is Nothing)
Then
mainform.DefaultButton = btnFPwd1.UniqueID
End If
btnFPwd1 is the button when entering the UserName
btnFPwd2 is the button when entering the secret answer
Both of these come not null in both situations.
I couldn't find a way to make the difference which one of the buttons
is pressed. How can I figure out the default button?
Any help?
Thanks