<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tailspin Spyworks - Adding Items to the Shopping Cart</title><link>http://www.asp.net</link><pubDate>Sat, 23 Jul 2011 00:38:42 GMT</pubDate><generator>umbraco</generator><description>Comments for Tailspin Spyworks - Adding Items to the Shopping Cart</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/33844" rel="self" type="application/rss+xml" /><item><title>Comment Posted by rickj1</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Wed, 30 Jun 2010 00:01:26 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009255</guid><description><![CDATA[ <p>Great stuff I got my first freelance job today I couldn&#39;t have done it with out you guys at Microsoft you have no idea how important these videos and tutorials are I&#39;ve watched almost every video you&#39;ve made Joe and every one has gave me something I could use that job is 40 per hour US thanks guys keep the vids and tutorials comming  </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/rickj1.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by JoeStagner</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Wed, 30 Jun 2010 09:35:16 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009264</guid><description><![CDATA[ <p>Thanks so much !  You made my day !!</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/JoeStagner.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by basbak</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Sat, 10 Jul 2010 16:55:45 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009403</guid><description><![CDATA[ <p>Hello Joe;</p><p></p><p>A couple of questions from a novice</p><p></p><p> CartTotal = myCart.Sum(od =&gt; (decimal)od.Quantity * (decimal)od.UnitCost); </p><p></p><p>this is total calculation from MyShoppingCart.cs file</p><p>First where did the &quot;od&quot; come from and </p><p>Second</p><p>How do you translate that line to VB.Net?</p><p></p><p>I&#39;d appreciate your reply, and Thanx again for everything, and God bless,, you&#39;re doing a great job.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/basbak.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mariaantonietta</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Wed, 14 Jul 2010 15:11:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009448</guid><description><![CDATA[ <p>Basbak, I think od is a lambda expression used as a collection, I think of orderdetails objects.  A possible translation in VB.Net could be the following:</p><p> </p><p>cartTotal = myCart.Sum(Function(od) CDec(od.Quantity) * CDec(od.UnitCost))</p><p></p><p>I haven&#39;t tested this, it&#39;s just a tentative answer at the top of my head.</p><p></p><p>I hope it helps in some way.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/mariaantonietta.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by basbak</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Wed, 14 Jul 2010 16:01:17 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009451</guid><description><![CDATA[ <p>Thanx maria,</p><p></p><p>I got it working with this and it works fine too</p><p></p><p> CartTotal = myCart.AsQueryable().Sum(Function(pkg) pkg.UnitCost * pkg.Quantity)</p><p></p><p>I will copy yours and try it out too.</p><p></p><p>I apprieciate your help and I am almost finished with the VB version, doing the final checkout.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/basbak.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by basbak</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Wed, 14 Jul 2010 16:10:35 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009452</guid><description><![CDATA[ <p>This is wiered,,, </p><p></p><p>To Maria,</p><p> </p><p>I just replied to your post and it disappeared, well I was saying that I got it to work afterall, and thanx for your reply and you are right it is collection expression, but I will try your code too, mine worked just fine, I used the following</p><p></p><p> CartTotal = myCart.AsQueryable().Sum(Function(od) od.UnitCost * od.Quantity)</p><p></p><p>which is the same.</p><p></p><p>Thanx again for your post</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/basbak.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mariaantonietta</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Thu, 15 Jul 2010 10:17:16 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009462</guid><description><![CDATA[ <p>That&#39;s great, basbak, thanks for your test.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/mariaantonietta.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by basbak</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Thu, 15 Jul 2010 22:49:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009473</guid><description><![CDATA[ <p>Hi Maria,</p><p>Thanx for the code, it worked just as well as the one I had, however I have a new problem, eventhough I tried and tried, I just couldn&#39;t get this query to translate, I even resorted to use a translator for it, it kept giving me a lot of errors, so I was hoping to ask for your expertise one more time if you have the time or maybe someone you know could help with this.</p><p></p><p>here is the query in C#</p><p></p><p>var query = (from ProductOrders in db.OrderDetails</p><p>                                 join SelectedProducts in db.Products on ProductOrders.ProductID equals SelectedProducts.ProductID</p><p>                                 group ProductOrders by new</p><p>                                 {</p><p>                                     ProductId = SelectedProducts.ProductID,</p><p>                                     ModelName = SelectedProducts.ModelName</p><p></p><p>                                 } into grp</p><p>                                 select new</p><p>                                 {</p><p>                                     ModelName = grp.Key.ModelName,</p><p>                                     ProductId = grp.Key.ProductId,</p><p>                                     Quantity = grp.Sum(o =&gt; o.Quantity)</p><p>                                 } into orderdgrp</p><p>                                 where orderdgrp.Quantity &gt; 0</p><p>                                 orderby orderdgrp.Quantity descending</p><p>                                 select orderdgrp).Take(5);</p><p></p><p>It&#39;s along one but I&#39;m sure it would be a peice of cake for someone like you.</p><p></p><p>Thanx again.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/basbak.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by basbak</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Sun, 18 Jul 2010 18:24:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009509</guid><description><![CDATA[ <p>To Maria and everyoneelse,</p><p></p><p>You just won&#39;t believe how rediculous the answer that found for that dilema, and how simple it was.</p><p></p><p>Thanx anyway and God bless.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/basbak.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by attrib75</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Fri, 27 Aug 2010 11:19:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000010013</guid><description><![CDATA[ <p>Question... Every time an anonymous user adds an item to their cart, a new guid for their cart ID is made.  How do we associate more than one item being added to a cart from an anonymous user as belonging to the same cart? Since every add to cart produces a new guid, it will look like different users added items to different carts rather than the same user.  Is there a way to distinguish?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/attrib75.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by boxers</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Tue, 28 Sep 2010 10:10:52 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000010418</guid><description><![CDATA[ <p>Can anyone publish a conversion to VB for this code, I am getting very frustrated :( with trying to get past this !</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/boxers.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by cherry1962</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Mon, 18 Oct 2010 10:53:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000010665</guid><description><![CDATA[ <p>I get this error when I try to build the app</p><p>&quot;the name Session does not exist in the current context&quot;</p><p>everywhere where I use:</p><p>Session[&quot;TailspinSpyworks_CartID&quot;]</p><p>Any ideas?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/cherry1962.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by JohannM0</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Fri, 05 Nov 2010 11:02:53 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000010838</guid><description><![CDATA[ <p>cherry 1962, I have the same probem and not sure where to ask the question. Wherever I use  the word &quot;Session&quot; in my MyShoppingCart.cs file it would be underine in red with a note - &#39;The name &quot;Session&quot; does not exist in the current context&#39; Can anybody give some advice please?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/JohannM0.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by dlazendi</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Thu, 13 Jan 2011 11:14:12 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000011504</guid><description><![CDATA[ <p>Hello, </p><p></p><p>I&#39;ve added everything like you said, I have no build erros, everything looks fine, but when I click Add To Cart button there is nothing added in ShoppinCart table... </p><p></p><p>Argh...</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/dlazendi.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by behnamizadi</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Sun, 06 Feb 2011 11:46:18 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000011947</guid><description><![CDATA[ <p>Same error as JohannM0 &amp; cherry1962, Session is not recognized does it belong to any namespace that we haven&#39;t implement...</p><p>I also run the original project source code (&quot;<a rel="nofollow" href="http://tailspinspyworks.codeplex.com/&quot;)" target="_blank">tailspinspyworks.codeplex.com/</a> also gives me same error... :( </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/behnamizadi.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by desai.net</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Thu, 17 Mar 2011 14:15:59 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012485</guid><description><![CDATA[ <p>WHAS C IN STATEMENT (from c in db.ShoppingCarts where c.CartID == cartID &amp;&amp; c.ProductID == productID select c).FirstOrDefault()</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/desai.net.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by devlooper</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Fri, 25 Mar 2011 23:17:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012616</guid><description><![CDATA[ <p>Hello,</p><p>Thanks alto for Joe Stagner</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/devlooper.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by darkrider23</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Thu, 26 May 2011 17:11:47 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013284</guid><description><![CDATA[ <p>desai, c is like a temp variable for making a query statement in code using linq or entities. It could be anything.</p><p><a rel="nofollow" href="http://msdn.microsoft.com/en-us/library/bb383978.aspx" target="_blank">msdn.microsoft.com/</a></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/darkrider23.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by NinjaSk8ter</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Sat, 23 Jul 2011 00:19:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013820</guid><description><![CDATA[ <p>isnt this defined as a partial class because of the .aspx?  why would you have 2 classes named MyShoppingCart?  What is the poing to combine these 2 pages into 1?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/NinjaSk8ter.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by NinjaSk8ter</title><link>http://www.asp.net/web-forms/videos/tailspin-spyworks/tailspin-spyworks-adding-items-to-the-shopping-cart</link><pubDate>Sat, 23 Jul 2011 00:38:42 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013822</guid><description><![CDATA[ <p>Joe, where is the ShoppingCart? we only saw you create a MyShoppingCart Object</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/NinjaSk8ter.jpg?forceidenticon=false&amp;dt=635046542400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>