0

Is there a way that i can save data on each step in wizard control. I want to save data when user clicks next button on each step. I would like to save them to database , so that i can retrieve them back if user has opted to close and complete steps later without clicking finish button

rs.
  • 26,707
  • 12
  • 68
  • 90

3 Answers3

2

In your code-behind, you can capture the "Active Step Changed" event and do whatever you want:

Protected Sub AddEmployeeWizard_ActiveStepChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddEmployeeWizard.ActiveStepChanged

  'save your data here

End Sub

If you just want to save on a click of the Next button, you could instead do

Protected Sub myWizard_NextButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles myWizard.NextButtonClick

    'save your data here

End Su

b

Jacob Mattison
  • 50,258
  • 9
  • 107
  • 126
1

You can save data to Session or ViewState objects.

Also you can add you saving logic in wizard events: ActiveStepChanged, CancelButtonClick, FinishButtonClick, NextButtonClick, PreviousButtonClick, SideBarButtonClick.

sashaeve
  • 9,387
  • 10
  • 48
  • 61
0

In ASP.NET you can probably stick it in the Session variable.

In an WPF or Winforms app, you could just put it in a variable in memory, and if these are settings for your program, you could save them to an XML file.

Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
  • i would like to save each step, bcos user may close browser and complete them later – rs. Mar 05 '10 at 16:32