Exemplo n.º 1
0
        //
        // GET: /Sites/Robot_Txt/
        public virtual ActionResult Index()
        {
            Robots_Txt robot_txt = new Robots_Txt(Site);

            var robotStr = robot_txt.Read();

            robot_txt.Body = robotStr;
            return View(robot_txt);
        }
Exemplo n.º 2
0
 public virtual ActionResult Index(string body)
 {
     JsonResultData data = new JsonResultData(ModelState);
     data.RunWithTry((resultData) =>
     {
         Robots_Txt robot_txt = new Robots_Txt(Site);
         robot_txt.Save(body);
         data.AddMessage("The robots.txt has been saved.".Localize());
     });
     return Json(data);
 }
Exemplo n.º 3
0
 public virtual ActionResult Index(string body)
 {
     JsonResultEntry resultEntry = new JsonResultEntry(ModelState);
     try
     {
         Robots_Txt robot_txt = new Robots_Txt(Site);
         robot_txt.Save(body);
         resultEntry.AddMessage("The robots.txt has been saved.".Localize());
     }
     catch (Exception e)
     {
         resultEntry.AddException(e);
     }
     return Json(resultEntry);
 }
Exemplo n.º 4
0
 public virtual ActionResult RobotsTxt()
 {
     Robots_Txt robotTxt = new Robots_Txt(Site);
     var body = robotTxt.Read();
     return Content(body, "text/plain");
 }