public ActionResult FollowUser(string id) { if (id == Session["user"].ToString()) { return(Json("Follow option is for other user's profile!", JsonRequestBehavior.AllowGet)); } try { FOLLOWING following = new FOLLOWING(); following.user_id = Session["user"].ToString(); following.following_id = id; dalLayer.FollowUser(following); return(Json("You are now following - " + following.following_id + "!", JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }