public ActionResult AddBookmarks()
        {
            if (Session["UserId"] == null)
            {
                return(RedirectToAction("Index", "User", new { Area = "" }));
            }

            AddBookmarksViewModel abvm = new AddBookmarksViewModel();

            return(View(abvm));
        }
 public ActionResult AddBookmarks(AddBookmarksViewModel abvm)
 {
     if (abvm.Name == null || abvm.URL == null)
     {
         return(View(abvm));
     }
     else
     {
         BookmarkService svc       = new BookmarkService();
         var             temptoday = DateTime.ParseExact(DateTime.Now.ToString("YYYY-MM-DD"), "YYYY-MM-DD", CultureInfo.InvariantCulture);
         svc.AddBookmarks(abvm.Name, abvm.URL, Convert.ToInt32(Session["UserId"]), temptoday);
         return(RedirectToAction("ShowBookmarks"));
     }
 }