Monday, July 12, 2010

How to change the status code of the Page Not Found page to 404 - Asp.net

public partial class PageNotFound : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        Response.Buffer = true;
        Response.StatusCode = 404;
        Response.Status = "404 Not Found";
    }
}

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...