Session doesn't work (making a Shopping Cart Razor MVC)
I'm trying to follow a tutorial on making a shopping cart for a webshop where you can buy tickets. In that tutorial it uses "Session". This is the tutorial I'm using: https://youtu.be/ZBd0MnKb7u0?t=15m4s Also, Session is in Microsoft's documentation: http://ift.tt/2m7dTz2 Please help. This is my code (which can't read Session): using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Ticketshop.Models;
namespace Ticketshop.Controllers { public class ShoppingCartController : Controller { public IActionResult Index() { return View(); } public IActionResult OrderNow(int id) { if(Session["cart"] == null) { List<> } return View(); } } }
0 comments:
Post a Comment