Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2007, 10:54 AM
Authorized User
 
Join Date: Sep 2006
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default Code Query

Hi,



Within an asp.net e-commerce site I'm looking at a way of calculating the total for my shopping cart. Whilst browsing on the net I found this example, which looks promising :

http://www.aboutmydot.net/index.php/...cart-in-aspnet

However I do not understand the lines :

For Each k As String In Items.Keys

Dim ci As CartItem = Items(k)



What does the k signify - any ideas ?

Thanks,


 
Old April 14th, 2007, 10:45 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

It signifies the key inside the Items object.


================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old April 15th, 2007, 11:42 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

rsm42:
Another way of defining "k" would be: "k" is the index value of the items, in this case, in a Cart.

Hope this helps.

========================
Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
 
Old April 16th, 2007, 12:06 PM
Authorized User
 
Join Date: Sep 2006
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks both






Similar Threads
Thread Thread Starter Forum Replies Last Post
Query about code Gini VB.NET 1 June 23rd, 2008 09:58 AM
Drop Down List Code Query rsm42 ASP.NET 1.0 and 1.1 Basics 1 July 4th, 2007 02:22 PM
code for insert query shabirmaher General .NET 1 August 8th, 2005 08:20 AM
code to copy a query recordset to a file Ivan Access VBA 9 October 31st, 2003 06:50 PM
Select Query Code stevewardau Access 4 July 9th, 2003 01:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.