public ActionResult All(int?page) { int userID; int.TryParse(Session["UserID"].ToString(), out userID); int pageNumber = page ?? 1; int pageSize = Convert.ToInt32(ConfigurationManager.AppSettings["tweetPageSize"]); return(PartialView(tweetBl.GetAll().Where(tweet => tweet.UserId == userID).ToPagedList(pageNumber, pageSize))); }
public string GetAllTweets() { var allTweets = tweetBL.GetAll(); string output = new JavaScriptSerializer().Serialize(allTweets); return(output); }