Private Function GetCart() As SortedList If Session("Cart") Is Nothing Then Session.Add("Cart", New SortedList) End If Return CType(Session("Cart"), SortedList) End Function
private SortedList GetCart() { if (Session["Cart"] == null) { Session.Add("Cart", new SortedList()); } return (SortedList)Session["Cart"]; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)