.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

shopping cart update qty

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net


im new in mvc and i am trying to do a shopping cart, but i was following the mvcstoresample, it is really nice, but it doesnt have quantities, and i wanna update that functionality, but in the shopping cart view i have a table populated via ajax, now i wanna have and update cart button and a textbox for the quantity, and when i click on update button i wanna update the subtotal by item and the total amount, how can i do that with ajax?


View Complete Post

More Related Resource Links

Shopping cart session

I am currently developing a shopping cart application. When a user adds a product to their shopping cart, I want their cart to be remembered for at least 3 hours or even more. I also want their cart to be remembered if they close/re-open their browser. If there is an update to the website (e.g. web.config changed) the cart needs to be remembered.I am thinking of using SQL server to store the sessions. Is this the best way for this scenario? Also how do I keep the session alive if users close their browser?

JQuery Shopping Cart


Hi everyone,

I am looking for the Shoppincg Cart code in JQuery.

If you know the URL(s), then please let me know.



Where to store Shopping Cart in MVC Application?


I am working on a Railway Portal and would require maintaining a shopping cart of components user has selected, there could be multiple components of different type in the cart. I don't see a value in storing the cart in database, would like to store the final order in DB. Where can I store/hold (temporary) the cart data per user session in MVC? All MVC samples I saw online save the cart data in DB - not sure why.

MVC presentation layer will be communicating with external web services for pricing and availability of these components, so I can't store only the product IDs to do a lookup for actual product descriptions/prices during the shopping process... I have to store everything in the cart (Product IDs, Descriptions, Prices etc) some place in memory.  My application will be running in WEB FARM environment and cannot use in-process session storage.

Options come to my mind are:


2. Using some kind of Distributed Caching Mechanism to store Session data such as "Windows Server AppFabric"


Shopping cart question


Helo Everyone.......

Actually i m now working on shopping cart application.....

i m using datalist control on my main page where i m displaying my products .....nd when i click one of  these products....i redirect to second page where all the information regarding the product is displayed.......

nd when i wanna purchase other product from mine main page nd i come back ....than information regarding all selected product lost which i already did selected for purchase.......

nd i m using gridview control for displaying information regarding the products on secongd page........

so share  ur valuable help me to come out from this problem that......how i have need to maintain the state of second page............

i think it's possible with session control......but how can we use......??

i m using asp.net with c# track.........

Advice for web app and shopping cart


 I need a web app the can do something similar to this: http://www.printmyribbon.com/design/ribbon/no/906

The app on this site is a flash app. Can a similar app be created with asp.net or silverlight perhaps?

I am going to be designing a site soon and also need to implement a shopping cart. What is the standard way of storing items in a shoppping cart for an asp.net app. Im playing with the idea of storing the items in a dataTable within a session variable.

Any imput on either of these questions would be greatly appreciated.


Shopping cart query


I am working on building a new shopping cart applicaiton. When i checked many shopping card applications, i found that the cateogry pages and product pages seems to be dynamically created. eg: http://shopping.sify.com/cadbury-bournville-almond/chocolates/CHOC24112009TTL14.htm

How this is being done? Is this page is created while adding product itself?

Shopping cart project for school


Win 7 professional N

Microsoft visual studio (student edition) 3.5 frame work

language: C#

SQL Express Server for the database.

Status of the application: Working, but the user can only checkout with 1 product.

My question:

I am building a very simple shopping cart website for a school project. After the user selects the item(s) and and quantity. What would be a better option to display what they ordered other than pulling the "order details" into a list box? I can only have the user select one item to check out with...   I've tried google for some examples but they all are showing examples of a listbox... Below is a rundow of my application.


It grabs the products from a database (ID, Name, Description, Price, ImgPath) and display the name of the product & the ID for the Value of the ddl in a drop down list . The order page will display : the name of the product, the description, the price, and a picture of the product. Their also is a drop down list for the quantity ( how many you want of a particular product ).

Once the user selects a product and how many he/she wants, that information is then transfered to a listbox on "checkout1.aspx".


The listbox (

using Session variables in shopping cart module.



     Can anybody explain me how can i use session variables in shopping cart module.There are many products from which the user can choose from.

I jus did small part of this module, On clickning Add To Cart Button, that product details will be bounded to datatable which will then be redirected to shopping cart page to display it in gridview. This is for only one product. (single product details (1 row) will be shown on this gridview)


Now my query is how do I Add Multiple products on clicking add to cart on some other products page retaining the previous product in gridview.


Also I would like to know how to manage different customers (username) in Shopping cart module.


Thank u in advance.


ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Update Vs SystemUpdate

Many of you might noticed that share point ListItem has Update() method as well as SystemUpdate().

What is the difference between these two methods and why MOSS has two different APIs for updating an ListItem

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

Visual Studio closes itself by opening aspx-Page designer after Windows Update


Hey Guys,

I've a problem with my Visual Studio.

On the 13th of August 2010 i installed a Windows update on my vista sp2 pc. For this date my Visual Studio 2008 sp 1 always has closed itself by opening an aspx-page in designer view. There is no error message just closing the window. I restored a backup of my windows from the time before updating it and it helped, i could open aspx pages in the design view till the update has been installed again automatically after rebooting the pc. I can't disable windows updates, cause it's my pc at work and safety is very important. I hope you could help me out of this disaster.



Update net frame 3.5.


I use visual studio 2008 but It's only use net frame work 2.0, Can I update and use net frame work 3.5 for Visual Studio 2008 ? Please help me !


update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


C++ at Work: Persisting View State Update, Using Managed Extensions in a DLL


This month marks the 11th anniversary of my column and the inauguration of a new title: C++ At Work. We're also adding a new bimonthly column, "Pure C++," by my pal Stan Lippman, one of the great C++ Masters.

Paul DiLascia

MSDN Magazine February 2005

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend