Solved

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

Posted on 2011-02-14
6
858 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
  • 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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 500 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Replacing HTML tags in Textarea/Textbox 5 29
asp.net bundle 8 36
Unable  to create new object 9 25
Close word object 13 21
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now