// GET: Purchase public ActionResult MyPurchase(string sessionId) { User user = UsersData.GetUserBySessionId("abc123"); if (user == null) { RedirectToAction("Login", "LoginUser"); } ViewData["purchasedList"] = PurchaseData.GetPurchasedList(user.UserName); ViewData["sessionId"] = sessionId; return(View()); }