Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 24, 2009 12:02 AM by LockTar
Sep 13, 2007 11:50 AM|LINK
I've been struggling with this. I want to set the continue button as the default and the currentpassword textbox as the focus in a changepassword control. I keep getting null reference errors though. Here is my code with several versions that I tried
with none of them working:
Page.Form.DefaultButton = PwdChg.FindControl(
I also tried these variations on the code but they did not work:
(...for default button)
Any help anybody can offer is appreciated. Thank you in advance...MDCragg
Mar 24, 2009 12:01 AM|LINK
I had this problem aswell. I solved it 3 min ago :).
The thing that I did to solve it is as follow.
<asp:ChangePassword ID="ChangePassword1" runat="server">
<asp:Panel ID="m_pnlChangePassword" runat="server" DefaultButton="ChangePasswordPushButton">
//The controls to change your password
Some other tips:
Want to see your errormessages in a validationsummary??
Place a validationsummary just beyond the closing tag of the changepassword control. Don't place it inside it because then you get errors after changing your password. (error comes just between password change button click and opening the completion step)
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="ChangePassword1" />
Mar 24, 2009 12:02 AM|LINK
Sorry.. double post of solution because of loading error on this forum....