?
Solved

How to add PREVIOUS button on STEP1 of ASP.Net wizard?

Posted on 2011-02-14
6
Medium Priority
?
874 Views
Last Modified: 2012-05-11
I want to add previous button on step 1 of ASP.Net wizard? How can I add it.
It should next to NEXT and PREVIOUS buttons.
cancel-button.bmp
0
Comment
Question by:AppDevs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 34893047
With custom navigation templates:

ASP .NET:

<asp:Wizard ID="testWizard" runat="server" ActiveStepIndex="0" OnPreviousButtonClick="testWizard_PreviousButtonClick">
    <WizardSteps>
        <asp:TemplatedWizardStep ID="twsFirst" runat="server">
            <ContentTemplate>
                This is the first step
            </ContentTemplate>
            <CustomNavigationTemplate>
                <asp:Button ID="cmdPrevious" runat="server" CommandName="MovePrevious" Text="My previous button" />
                <asp:Button ID="cmdNext" runat="server" CommandName="MoveNext" Text="My next button" />
            </CustomNavigationTemplate>
        </asp:TemplatedWizardStep>
        <asp:TemplatedWizardStep ID="twsSecond" runat="server">
            <ContentTemplate>
                This is the second step
            </ContentTemplate>
            <CustomNavigationTemplate>
                <asp:Button ID="cmdPrevious" runat="server" CommandName="MovePrevious" Text="My previous button" />
                <asp:Button ID="cmdNext" runat="server" CommandName="MoveNext" Text="My next button" />
            </CustomNavigationTemplate>
        </asp:TemplatedWizardStep>
        <asp:TemplatedWizardStep ID="twsThird" runat="server">
            <ContentTemplate>
                This is the third step
            </ContentTemplate>
            <CustomNavigationTemplate>
                <asp:Button ID="cmdPrevious" runat="server" CommandName="MovePrevious" Text="My previous button" />
                <asp:Button ID="cmdNext" runat="server" CommandName="MoveComplete" Text="My finish button" />
            </CustomNavigationTemplate>
        </asp:TemplatedWizardStep>
    </WizardSteps>
</asp:Wizard>

C#:

protected void testWizard_PreviousButtonClick(object sender, WizardNavigationEventArgs e)
{
    if (e.CurrentStepIndex == 0)
        Response.Output.Write("You clicked previous on first wizard step");
}
0
 

Author Comment

by:AppDevs
ID: 34907178
I am using  <asp:WizardStep runat="server"> tags.
I am using <table> tags in my design, so I would like to keep  <asp:WizardStep> tags
<CustomNavigationTemplate> tag is not recognized by <asp:WizardStep> tag.
Is there any other way to add the PREVIOUS button to the wizard template.
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 34907824
Use the property StepType of your first WizardStep:

<asp:Wizard ID="wTest" runat="server" ActiveStepIndex="0">
    <WizardSteps>
        <asp:WizardStep Title="First step" StepType="Step" ID="wsFirst" runat="server">
            This is the first step
        </asp:WizardStep>
        <asp:WizardStep Title="Second step" ID="wsSecond" runat="server">
            This is the second step
        </asp:WizardStep>
        <asp:WizardStep Title="Third step" ID="wsThird" runat="server">
            This is the third step
        </asp:WizardStep>
    </WizardSteps>
</asp:Wizard>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:AppDevs
ID: 34909840
I apologize for not posting the whole tag I am useing
<asp:WizardStep runat="server" title="Step 1" StepType="Start">
I already have StepType.
0
 
LVL 15

Accepted Solution

by:
jorge_toriz earned 2000 total points
ID: 34910041
Well, if you want to show the previous button you must change the step type to "Step"... or, can't you do that change?
0
 

Author Closing Comment

by:AppDevs
ID: 34915556
Thanks, I got the PREVIOUS button STEP 1 of the wizard.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question