public ActionResult AddLinkRequest(int itemId, string link) { //store new item, link and new comment(if not null) DataRepository helper = new DataRepository(); if (!helper.linkExists(link, itemId)) helper.AddLink(link, itemId, Session["Username"].ToString()); else { helper.LikeLinkInstead(link, itemId); TempData["LinkExists"] = "That link has already been added against this recommendation. We have liked this link instead."; } Item item = helper.getItemById(itemId.ToString()); return RedirectToAction("Discussion", new {Id = item.Username, state = "Network", itemId = itemId }); }