Wednesday, March 21, 2012

Panels DefaultButton in CreateUserWizard

Hello,

I have a panel, that surround the CreateUserWizard. How can I set the DefaultButton property on the Panel to the CreateUserWizard??

Snippet:

<asp:Panel runat="server" ID="panUserCreate">
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
RequireEmail="False"
....... .........
<asp:CreateUserWizardStep runat="server">
<ContentTemplate>
<table border="0">...............
</ContentTemplate>
<CustomNavigationTemplate>
<table border="0" cellspacing="5" style="width: 100%; height: 100%;">
<tr>
<td align="left">
<asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" Text="Opret medlem"
ValidationGroup="CreateUserWizard1" />
</td>
</tr>
</table>
</CustomNavigationTemplate>
</asp:CreateUserWizardStep
I have tried:
panUserCreate.DefaultButton = ((Button)CreateUserWizard1.CreateUserStep.CustomNavigationTemplateContainer.FindControl("StepNextButton")).UniqueID;

But doesn't work. Only when I hardcode the ID like:
panUserCreate.DefaultButton = "CreateUserWizard1$__CustomNav0$StepNextButton";

Any suggestions??

Cheers,

Ken

I have a similar problem. More specifically, I want the default button of the createuserwizard to be the "Create User" button in the first step and the "Continue" button in the completion step. How do I achieve that?


Thanks

Anand

0 comments:

Post a Comment