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, Darrell. I tried the approach described in that article - I converted the first step of the createuserwizard to a custom navigation template, and modified the customnavigationtemplate to add UseSubmitButton = "true". Here is what my customnavigationtemplate
section looks like:
wats the setting to get controls buttong on design page am not getting that even not picking n its looking on toolbox but not pasting plz tell suggestion abt it
I usually would like to set this Page.Form.DefaultButton property to the UniqueID property of the wizardStep's navbutton. Here is the code about how to register this button as DefaultButton in code-behind. Hope it helps
Best Regards
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Sorry, it worked for the first step, but it didnt work for the second step - i.e the continue button on the completion step - I converted that page to a step navigation template, and added a prerender handler for the continue (stepnextbutton) button, and
pointed it to the same function that worked for my first wizard step. But still, when I hit continue, nothing happens on the completion page.
I converted that page to a step navigation template, and added a prerender handler for the continue (stepnextbutton) button, and pointed it to the same function that worked for my first wizard step. But still, when I hit continue, nothing happens on the
completion page.
Hi
If you want to set the URL of the page that the user will see after clicking the Continue button on the success page(CompleteWizardStep), please use ContinueDestinationPageUrl property. Another approch is convert to templete: right click on the wizard control
and choose "Customize Complete step", then handle the ContinueButton_Click event on the code behind.
Best Regards
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Sorry, but your response is to a different question than what I asked. I want that when the user hits enter when on the complete step, the continue button is clicked.
I know what you mean, but there is no textBox on the CompleteWizardStep, so it's determined primarily by browser behavior. For test purpose, you can only put submit on page, using the following example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
Press entry key on page and press entry key in text box, the position of the focus giving the submit a different result. If you still want to handle the entry key in this scenario, I suggest you use a work around by javascript
e.g: if (event.keyCode == 13) {
// submit
}
Best Regards
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
rcanand
Member
51 Points
73 Posts
Setting default button in createuserwizard
Jan 02, 2008 08:17 AM|LINK
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
createuserwizard default button
DarrellNorto...
All-Star
86665 Points
9634 Posts
Moderator
MVP
Re: Setting default button in createuserwizard
Jan 02, 2008 01:08 PM|LINK
Check out this article in the "Customizing the Navigation User Interface" section:
http://aspnet.4guysfromrolla.com/articles/062806-1.aspx
Darrell Norton's Blog
Please click "Mark as Answer" if this helped you.
rcanand
Member
51 Points
73 Posts
Re: Setting default button in createuserwizard
Jan 02, 2008 03:43 PM|LINK
Thanks, Darrell. I tried the approach described in that article - I converted the first step of the createuserwizard to a custom navigation template, and modified the customnavigationtemplate to add UseSubmitButton = "true". Here is what my customnavigationtemplate section looks like:
<CustomNavigationTemplate>
<table border="0" cellspacing="5" style="width: 100%; height: 100%;">
<tr align="right">
<td align="right" colspan="0">
<asp:Button ID="StepNextButton" runat="server" BackColor="#FFFBFF" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1px" CommandName="MoveNext" Font-Names="Verdana"
ForeColor="#284775" Text="Create User" ValidationGroup="CreateUserWizard1" UseSubmitBehavior="true" />
</td>
</tr>
</table>
</CustomNavigationTemplate>
However, this did not seem to change the behavior. It still takes me back to the previous page (from where I navigated to the create user page).
Thanks
Anand
asmasp
Member
2 Points
2 Posts
plz tell me am not getting my controls buttons on design page
Jan 02, 2008 06:21 PM|LINK
plz tell me
wats the setting to get controls buttong on design page am not getting that even not picking n its looking on toolbox but not pasting plz tell suggestion abt it
XiaoYong Dai...
All-Star
38310 Points
4229 Posts
Re: plz tell me am not getting my controls buttons on design page
Jan 04, 2008 08:36 AM|LINK
Hi
I usually would like to set this Page.Form.DefaultButton property to the UniqueID property of the wizardStep's navbutton. Here is the code about how to register this button as DefaultButton in code-behind. Hope it helps
---------------------default.aspx--------------------
<asp:CreateUserWizard ID="CreateUserWizard2" runat="server" ActiveStepIndex="1">
<WizardSteps>
<asp:TemplatedWizardStep runat="server" StepType="Start">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
</asp:TemplatedWizardStep>
<asp:TemplatedWizardStep runat="server" StepType="Step">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</ContentTemplate>
<CustomNavigationTemplate>
<asp:Button ID="StepPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious"
Text="Previous" />
<asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" OnPreRender="StepNextButton_PreRender"
Text="Next" />
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:CreateUserWizardStep runat="server">
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
-------------default.aspx.cs-----------
protected void StepNextButton_PreRender(object sender, EventArgs e)
{
this.Page.Form.DefaultButton = (sender as Button).UniqueID;
}
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
rcanand
Member
51 Points
73 Posts
Re: plz tell me am not getting my controls buttons on design page
Jan 04, 2008 11:20 AM|LINK
Thanks very much, that worked.
rcanand
Member
51 Points
73 Posts
Re: default button on custom wizard page
Jan 04, 2008 12:14 PM|LINK
Sorry, it worked for the first step, but it didnt work for the second step - i.e the continue button on the completion step - I converted that page to a step navigation template, and added a prerender handler for the continue (stepnextbutton) button, and pointed it to the same function that worked for my first wizard step. But still, when I hit continue, nothing happens on the completion page.
XiaoYong Dai...
All-Star
38310 Points
4229 Posts
Re: default button on custom wizard page
Jan 07, 2008 01:29 AM|LINK
Hi
If you want to set the URL of the page that the user will see after clicking the Continue button on the success page(CompleteWizardStep), please use ContinueDestinationPageUrl property. Another approch is convert to templete: right click on the wizard control and choose "Customize Complete step", then handle the ContinueButton_Click event on the code behind.
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
rcanand
Member
51 Points
73 Posts
Re: default button on custom wizard page
Jan 07, 2008 08:06 AM|LINK
Sorry, but your response is to a different question than what I asked. I want that when the user hits enter when on the complete step, the continue button is clicked.
XiaoYong Dai...
All-Star
38310 Points
4229 Posts
Re: default button on custom wizard page
Jan 07, 2008 11:34 AM|LINK
I know what you mean, but there is no textBox on the CompleteWizardStep, so it's determined primarily by browser behavior. For test purpose, you can only put submit on page, using the following example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY><form onsubmit="alert('submit');">
<input type="submit" value="aa"/>
<input type="text"/>
<form>
</BODY>
</HTML>
Press entry key on page and press entry key in text box, the position of the focus giving the submit a different result. If you still want to handle the entry key in this scenario, I suggest you use a work around by javascript
e.g: if (event.keyCode == 13) {
// submit
}
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.