locked
How to use Wizard Step property in a Wzard RRS feed

  • Question

  • User587613188 posted

    Hi ,

    I am developing a website in VB.net. In one of the aspx page i am using a Wizard and this wizard has 3 Wizard Steps with a usercontrol in each step. The thing is whenever a post back event occurs all the user controls in the wizard are being loaded again and again. I just want load only required user control(to run only certain wizard step). For example, when i click next button in A1.ascx , i want to load only B1.ascx and dont want to load all 3(i.e all 3 wizard steps) usercontrols again.On searching online i found that we can use WizardSteps to do this. But i dont know how to do this. 

    Could someone help me out.

    My code is as follows;

    <%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeFile="Default.aspx.vb" Inherits="_Default" %>
    <%@ Register TagPrefix="UC" TagName="A1" Src="~/A1.ascx" %>
    <%@ Register TagPrefix="UC" TagName="B1" Src="~/B1.ascx" %>
    <%@ Register TagPrefix="UC" TagName="C1" Src="~/C1.ascx" %>

    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
    Welcome to ASP.NET!
    </h2>
    <asp:Wizard ID="wzdCheckOutPage" runat="server" DisplaySideBar="false" ActiveStepIndex="0"
    Width="100%" >

    <WizardSteps>

    <asp:WizardStep ID="WizardStep1" runat="server" Title="Login/Register">
     <div class="panel panel-success">
       <div class="panel-body">
             <UC:A1 ID="A1" runat="server" />
       </div>
    </div>
    </asp:WizardStep>

    <asp:WizardStep ID="WizardStep2" runat="server" Title="Your Details">
     <div class="panel panel-success">
      <div class="panel-body">
        <UC:B1 ID="B1" runat="server" />
      </div>
     </div>
    </asp:WizardStep>


    <asp:WizardStep ID="WizardStep3" runat="server" Title="Recipient's Details">
      <div class="panel panel-success">
       <div class="panel-body">
         <UC:C1 ID="C1" runat="server" />
      </div>
     </div>
    </asp:WizardStep>

    </WizardSteps>

    </asp:Wizard>


    </asp:Content>

    Thanks in Advance.

    Sunday, May 18, 2014 9:44 PM

Answers

  • User1140095199 posted

    Hi,

    I am developing a website in VB.net. In one of the aspx page i am using a Wizard and this wizard has 3 Wizard Steps with a usercontrol in each step. The thing is whenever a post back event occurs all the user controls in the wizard are being loaded again and again. I just want load only required user control(to run only certain wizard step). For example, when i click next button in A1.ascx , i want to load only B1.ascx and dont want to load all 3(i.e all 3 wizard steps) usercontrols again.On searching online i found that we can use WizardSteps to do this. But i dont know how to do this. 

    What you are looking for is partial page updates! Use AJAX for that. Place Update Panels inside each Wizard Step. Put your UserControls inside the Panel and trigger Partial Page Updates.

    AJAX, which stands for Asynchronous  JavaScript And XML, is an integrated framework for providing incremental page updates via cross-platform JavaScript, composed of server-side code comprising the Microsoft AJAX Framework, and a script component called the Microsoft AJAX Script Library.

    Perhaps the most visible feature of the ASP.NET AJAX Extensions is the ability to do a partial or incremental page updates without doing a full postback to the server, with no code changes and minimal markup changes

    For more reference take a look at the following articles:

    Understanding Partial Page Updates with ASP.NET AJAX

    Partial-Page Rendering Overview

    Hope it helps!

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 19, 2014 10:53 PM