In the following code, copied from the online shopping cart starter kit from the page AddToCart.aspx, there is a line I would like to ask a question about. The code for the line is
Dim cart As ASPNET.StarterKit.Commerce.ShoppingCartDB = New ASPNET.StarterKit.Commerce.ShoppingCartDB()
I am trying to figure out what that is. To me it looks as though ASPNET.StarterKit.Commerce is the NameSpace of the Public Class and ShoppingCartDB is the Public Class Name. So I tried to substitute my own namespace and class name like this but I get an error. The code I use follows the code copied from the site. Any help would be great. Thanks.
<%@ Page Language="VB" %>
<script runat="server">
'*******************************************************
'
' The Page_Load event on this page is used to add the
' identified product to the user's shopping cart, and then immediately
' redirect to the shoppingcart page (this avoids problems were a user hits
' "refresh" and accidentally adds another product to the cart)
'
' The product to add to the cart is specified using
' a querystring argument to the page.
'
'*******************************************************
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Request.Params("ProductID") Is Nothing Then
Dim cart As ASPNET.StarterKit.Commerce.ShoppingCartDB = New ASPNET.StarterKit.Commerce.ShoppingCartDB()
' Obtain current user's shopping cart ID
Dim cartId As String = cart.GetShoppingCartId()
' Add Product Item to Cart
cart.AddItem(cartId, CInt(Request.Params("ProductID")), 1)
End If
Response.Redirect("ShoppingCart.aspx")
End Sub
</script>
MY CODE IS BELOW
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Request.Params("fldStockNo") Is Nothing Then
Dim SalesSide As SalesSide1.SalesSide2 = New SalesSide1.SalesSide2()
' Obtain current user's shopping cart ID
Dim fldOrderNo As String = SalesSide.GetShoppingCartId()
' Add Product Item to Cart
SalesSide.AddItem(cartId, CInt(Request.Params("ProductID")), 1)
End If
Response.Redirect("ShoppingCart.aspx")
End Sub
</script>
<html>
<head>
</head>
<body>
<pre></pre>
</body>
</html>
-Shiner