title: Can we print error message before form begin in mvc?
body: <p>can we print error message before form start, I am using mvc v4</p>
  
  <p>this is my controller action code
            [HttpGet]</p>
  
  <pre><code>        public ActionResult ChangePassword(string aToken)
          {
            aToken = Server.UrlDecode(aToken);
  
            if (aToken != null)
            {
             .........
             }
            else
            {
        ViewBag.Error = "Sorry, this link is not being recognized as valid. 
            }
  
      return view();`enter code here`
          }
  </code></pre>
  
  <p>this is my cshtml file</p>
  
  <pre><code>    @if (ViewBag.Error != null)
  
      {
        &lt;p class="text-danger"&gt;
          @ViewBag.Error
        &lt;/p&gt;
      }
      else
      {
        using (Html.BeginForm("ChangePassword", "Account", FormMethod.Post, new { 
       @class = "form-horizontal ", role = "form" }))
        {
  
           ........................
        }
  
      }`enter code here`
  </code></pre>
  
  <p>technicality, is this correct?</p>