It is perfectly OK to use sessions in ASP.NET MVC, especially in the shopping cart scenario of yours.
There are drawbacks of using sessions, but they seem not to apply to your case:
1) The sessions prevent a user to properly browse your site from multiple browser tabs, the changes made in one tab are reflected in all others.
But with a shopping cart, it's exactly what you need. You don't need several shopping carts per user, do you?
2) The sessions aren't persisted by default, and if you're operating on a webfarm, you need to save the sessions in your database to be accessible by every farm node.
But it seems unlikely that you're scaling like this. And if you meet the scaling neccessity, sessions won't be your top problems.
3) Sessions require additional functionality from the user's browser (typically, cookies). But modern browsers all support cookies, so you only have to worry about very special browsers.
There are also some benefits of the sessions over hidden inputs:
1) The smaller overhead. Only a small session cookie is passed back and forth between you and the client, rather than the complete set of hidden inputs.
2) Simpler programming. You don't have to make sure you included your hidden inputs in every single one of your pages.
3) Security. The client can alter the contents of hidden inputs however he pleases. You can't easily pass sensitive information via hidden inputs, you need to encrypt it. Session values are stored on the server, so the client doesn't have access to them.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…