• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 28. Adding Shopping Cart Functio... > Building an ASP.NET Shopping Cart

Building an ASP.NET Shopping Cart

So far you've seen how the UltraDev Shopping Cart can help you with building a full functioning ASP shopping cart under an ASP server model. But what if you were using ASP.NET? Unfortunately, as an ASP.NET developer, you're at a slight disadvantage because free extensions currently do not exist. But who needs extensions when you can build the shopping cart by hand just as easily using ASP.NET. In the following sections, we'll do just that. You'll see how, with a little knowledge of DataSets and DataTables, you can easily build the ASP.NET shopping cart. Let's get started.

As you have seen in the previous chapters, DataSets provide you with a way of creating a purely memory-resident representation of a database table. DataSets, like recordsets in ASP, act as an intermediary between the database and the code. Unlike recordsets, however, the DataSet mirrors the database more closely. DataSets contain tables (called DataTables); the DataTables contain columns and rows (called DataColumns and DataRows), and multiple DataTables within a DataSet can even contain relationships (DataRelations). Because DataTables have columns represented by the columns property and rows represented by the rows property, DataTables are viable alternative when creating an ASP.NET shopping cart from scratch in Dreamweaver. We can build the columns just as we would in a database using the columns property of the DataTable and add rows to the DataTable with the rows property. With the DataTable built, we can then bind the DataTable to a DataGrid to display the results in an intuitive manner.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint