public ActionResult random() { Article article = new Article(); int id = article.GetRandom(); // return RedirectPermanent("/story/number/" + id.ToString()); return View(article); }
public void Load () { DataTable table = sql.Select("SELECT * FROM story ORDER BY id DESC LIMIT 40"); articles = new Article[table.Rows.Count]; for (int j = 0; j < table.Rows.Count; j++) articles[j] = new Article(table.Rows[j]); }
public ActionResult number() { string id; if (RouteData.Values["id"] == null) id = "1"; else id = (string)RouteData.Values["id"]; Article article = new Article(); article.GetArticle(id); return View(article); }