title: Possible to throw a 404 error within an ASP.Net page?
body: <p>I was wondering if it's possible to throw a 404 error from within a page(code behind)? Or possibly even throw any other type of error page such as 408(timeout) or 401(authentication required)? </p>
  
  <p>Note: I don't just want to have the page return a status code of 404, I want it to use the ASP.Net(or my CustomErrors) 404 error page. </p>
  
  <p>Something like this in the code behind:</p>
  
  <pre><code>if(id&gt;10){ //if id is greater than 10, then it doesn't exist here
    throw 404Error();
  }
  </code></pre>