ASP.NET 向导后退按钮不起作用

发布于 2024-07-29 06:31:00 字数 286 浏览 2 评论 0原文

我有一个 ASP.NET 向导运行我的购物车结帐过程。 我刚刚在第二步中添加了 Paypal Express 结账链接。 Paypal 流程使用户离开页面,然后在完成后将他们重定向回我的向导。 当用户从 Paypal 返回以将向导设置为步骤 3 时,我正在使用 Request.QueryString 解析 HTTP 参数。这加载得很好,但是当我单击(向导的“后退”按钮)时,它会进行回发,但停留在第 3 步。有人能想到其中的原因吗? 它引用的链接仍然具有 HTTP 参数,但我会在基于参数以编程方式设置向导步骤之前检查回发。 有人对这个有经验么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雪若未夕 2024-08-05 06:31:00

好吧,我不确定它为什么这样做,但使用以下代码覆盖向导上的黑盒 PreviousButtonClick 事件修复了它。 在我看来,这应该是按钮正在实现的行为,但事实并非如此。 诡异的。


    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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文