title: Redirecting to a webpage when an error occurs in a view
body: <p>I need to go to a certain page if this code has an error can anyone help me out?</p>
  
  <p>I leave the catch black is there a certain code that will redirect me to my <em>Error Controller Index</em>?</p>
  
  <pre><code>try
  {
    var tree = ViewData["data"] as IEnumerable&lt;PrototypeHelp.Models.Treeview&gt;;
  }
  catch (Exception)
  {
  
  }
  </code></pre>