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

Top 5 Contributors of the Month
Imran Ghani
Post New Web Links

Shopping cart question

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

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.........

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?

Webshop question - Where to put the cart?



Im currently building a very "lit-webshop"..and I whould like all my users to get a cart for the shopping, but the thing is that in my nudle the idea is to create a list-object containing all the products that the user wants to buy and then add that list somewhere, for instance to a session...but the problem is that a session usually ends within 30mins..and I know I can change this value, but the problem remains that after x-ammount of time the cart will get "dropped"....another aproach is to store the cart in a cookie...is this a safe and good way to go?...the second wat I though of is to store it temporary in a database-table and then simply link the UserID and the Cart with eah other..so for retriveing the correct cart i just whould do something like:

SELECT Cart FROM TemporaryCarts WHERE UserID = [the user ID]

Well to go back to the main-problem, whats the best approach to store the cart without makeing it drop after x-amount of time?

How whould you solve this?

Sorry if my english is all messed up...

Thanks in advance!

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 update qty



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?


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.


Some basic MVC question

  1. In regular asp net I can run (debug) the application but I can either "view in browser" that gives me the option to view the application and write code on same time.

In MVC I can't find this option.

  1. What is the basic DATA MODEL for working with SQL DB.

I mean with no any framework (entity framework, Sub sonic, Link to SQL etc')

I look for basic application that works with data but with no fw.

  1. What is the popular DB framework that working with data.
  2.  I am looking on  mvc series


C# Soup To Nuts  (the best series ever)


I watch some of the MVC video, seems that the music store is good but I have to wait to the other part.

Does any one know and recommend   a Microsoft MVC tutorial?





Web Site to Web Application Question


I've been building web sites and for my next project I will be creating a web application.  I use a 'BasePage' class in all my projects but, since web applications do not contain the 'App_Code' folder, what is the best place/practice for the 'BasePage' class?



connection string question from a newbie


when publishing  in the webmatrix dialogue it asks for "destination connection string" for my "database.mdf"

I was not sure what it was so I pasted this from my web.config file :

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True;User Instance=True

it all published ok, but wont run, so I guess it has somthing to do with this connection string or some kind of configuration issue.

My question is this, What should go in the field for "Destination connection string"

Security Question Answer Retrieval


I know there is a method built in for retrieving the encrypted password, but how do I retrieve the encrypted security answer?

What I want to do is have a member profile update screen that the end user can update their password and security question and answer. However, when they get to this page, I want to already be showing the security question (the easy part) and its answer (the not so easy part).

I have updated web.config with passwordFormat=Encrypted and have added a machineKey with the generator (forgot the link, but located on eggheadcafe somewhere).

I haven't done ANYTHING yet, since I already have a user store with hashed information. I wanted to get some functionality done before publishing, wiping the store and recreating users (only a couple developers).


Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




C#, LINQ: (List<>) Question???


Hi Everyone,

I have a strange problem:


There is an entity (Table) called "Filters" in my .edmx which has all my tables and stuff in it (to use it for LINQ queries)

I have created a class called "CustomFilters" which inherits "Filters". So now my cutom class has all the properties of the original "Filters" class (table) and 1 more additional property that i wanted which is a List of "CustomFilters":

List<CustomFilters> children = new List<CustomFilters>();

Now i get all my records into:

List<CustomFilters> theOriginalList = new List<CustomFilters>();

NOTE: first all records are tken into a List<Filters> and then these are added into List<CustomFilters> where List<CustomFilters> for children of that record is added, and then children of the child records, and so on......

so now, every record is an instance of CustomFilters which has a property named "children" which is a list again; and each child again has instanaces of "CustomFilters", and each instance again has children...and on and on and on.....

(basiacally its a data source for a treeview in my silverlight control)

every thing is good and working as expected.


linqdatasource parameters question



I'm currently getting to know the linqdatasource control. What would happen if several WHERE parameters are added to the linqdatasource control declaritively in the aspx page but no WHERE clause is defined? 

1. is there any issue with setting up multiple WHERE parameters in the aspx markup for linqdatasource but then deciding which ones actually get used at runtime by setting the actual WHERE clause at run time? Would the unused parameters simply be ignored and cause no issues?

2. when you need to modify WHERE clause or WHERE parameters at runtime do you need to do so in an event handler? such as linqdatasource.selecting?
I see from the above link it is possible, but is that the standard way to handle controlling filtering in code behind for linqdatasource?

2b. if you use an event such as linqdatasource.selecting to add where parameters and/or modify the where clause in code will that also break the builtin sorting and paging support of the linqdatasource with a gridview? 

database interface design question


For handy database interface, is it good to use SqldataSources exclusively intead of EntLib functions?

Thanks for any feedback.

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