CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > starter_kits_and_source_projects.commerce_starter_kit Tags:
Item Type: Date Entered: 1/18/2005 9:33:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 45 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
"Shiner452" <>
NewsGroup User
AddToCart.aspx1/18/2005 9:33:22 PM

0

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

"paulssprd" <>
NewsGroup User
Re: AddToCart.aspx1/28/2005 7:00:11 PM

0

The ASPNET.StarterKit.Commerce is a complied namespace. To use your own namespace and class you will need to recomplie the page. To recompile the page go to the command prompt, and cd into the folder which contains the VB page and enter:

vbc /t:library /r:System.dll,System.Web.dll,System.Data.dll ShoppingCartDB.vb

This should recomplie the code for page ShoppingCartDB.vb
You will then need to cut and copy this newly created dll and put it into your /bin folder.
You should then beable to call your new namespace and classes just like they are now in the addtocart.aspx

4GuysfromRolla also has a help page, in which they are compiling a C# page, but the compile command is a little different but does the same thing. So if you need any help you can look here also.

http://www.4guysfromrolla.com/webtech/100500-1.2.shtml

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:













where did ibuyspy go?

the aspnet account

changing ib store prices from $ to £

how to transfer customerid from orderlist.aspx to orderdetail.aspx

no admin

no design view

need help to run the ibuyspy store application

limiting search results

another ‘could not add aspnet user to sql server’

found a minor bug in migrating shopping cart feature

reviewlist doesn't get correct productid

reviews of eshop-server??

installing commerce starter kit on a web host

product image control ibs

paypal payments

¿ how i can program commercestarterkit .net 2.0's web services api ?

object reference not set to an instance of an object.

everyone having cooking problems - no one has answers?

adding a checkbox to the shopping cart

configuration problem (aspnet user)

postback problem, (i think).

unable to download ibuyspy store

new page questions

store error

error while trying to run project: unable to start debugging on the web server.

xsl versus xslt

sql server does not exist or access denied.

installing the access version

can't download starter kits?

i'm back with another question! asp:textbox and html?

xp sp2 compatibility starter kits

help! help! searchresults

cart migration bug

can we integrate cms into existing website?

how should i set up the envirment to use ibuyspy store

cant view commerce starter kit

paypal commerce starter kit - shared ssl

error message cs0117: 'system.web.ui.webcontrols.dropdownlist' does not contain a definition for 'text'

shipping/billing info tables, modules

"selection" in menu

does anyone use the commerce starter kit?

can't install

stored procedures converted to inline sql

extended classifieds / sql

components and making updates

how to add three level of category?

commerce with queued components etc.

blank page for text

commerce starter kit (vb vs) cannot open .sln in vs.net 2003

if i forget password, how do i set up a page so can have it sent to me again.

   
  Privacy | Contact Us
All Times Are GMT