views:

209

answers:

1

I have a ASP.NET Wizard running my checkout process of my shopping cart. I just added a Paypal Express checkout link to my 2nd step. The Paypal process takes the user away from the page and then redirects them back to my wizard when they're done. I'm parsing an HTTP parameter with Request.QueryString when the user comes back from Paypal to set the wizard to step 3. This loads just fine, but when I click on the Back button (of the wizard), it does a postback but stays on step 3. Can anyone think of a reason for this? The link it's referencing still has the HTTP parameters, but I'm checking for a postback prior to programmatically setting the wizard step based on the parameter. Does anyone have any experience with this?

+1  A: 

Well, I'm not sure why it was doing it, but overriding the blackbox PreviousButtonClick event on the wizard with the following code fixed it. It seems to me like this should be the behavior the button was implementing anyway, but it wasn't. Weird.


    Protected Sub wizSubmitOrder_PreviousButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles wizSubmitOrder.PreviousButtonClick
    Dim previousStepIndex As Integer = wizSubmitOrder.ActiveStepIndex - 1
    wizSubmitOrder.MoveTo(wizSubmitOrder.WizardSteps(previousStepIndex))
  End Sub

fr0man
Thanks, this code helped with a problem that I was having with the wizard.
danyim