title: ASP net MVC5 "view validation if only routed from another controller not by typing in address bar"
body: <p>I have controller where inside are 2 methods , the validation is a code, if it is correct then call the another method in different controller, but there is a problem if someone write in the address bar the controller for example home/sdata/display then it retrieve the data without writing the password(code) how can i prevent to display the data until he writes the code </p>
  
  <pre><code>    public ActionResult predata() 
      {
          return View();
      }
      [Authorize]
      [HttpPost]
      [ValidateAntiForgeryToken]
      public ActionResult prerest(string paswd)
      {
          if (paswd == "123456852")
          {
              return RedirectToAction("sdata","displays");
  
          }
          return View();
      }
  </code></pre>