再次声明由后台代码提供示例的内容当页面第一次加载时进行检查以查看购物车中是否有商品如果没有则使向导不可见并且不显示任何购物车标签用于通知用户购物车中没有任何商品第二个检查是查看是否已经验证用户的身份这是测试他们是否已经登录如果他们已经登录则让这些用户通过登录阶段否则必须让他们先登录
Sub Page_Load(ByVal sender As Object ByVal e As SystemEventArgs) Handles MeLoad
If ProfileCart Is Nothing Then
NoCartlabelVisible = True
WizardVisible = False
End If
If UserIdentityIsAuthenticated Then
WizardActiveStepIndex =
Else
WizardActiveStepIndex =
End If
End Sub
代码中的下一个过程是响应在第二步(递送地址)中改变的复选框如果选中这个复选框则使用存储在用户配置文件中的详情填充文本框否则保留这些文本框为空
Sub chkUseProfileAddress_CheckedChanged(ByVal sender As Object ByVal e As SystemEventArgs)
fill the delivery address from the profile but only if its empty
we dont want to overwrite the values
If chkUseProfileAddressChecked AndAlso txtNameTextTrim() = Then
txtNameText = ProfileName
txtAddressText = ProfileAddress
txtCityText = ProfileCity
txtCountyText = ProfileCounty
txtPostCodeText = ProfilePostCode
txtCountryText = ProfileCountry
End If
End Sub
NextButtonClick用于检查用户是否已经成功登录从而可以前进到向导的下一个阶段
[] [] [] [] [] [] [] []