Home Web Development Creating a custom error page in ASP.NET
Creating a custom error page in ASP.NET PDF Print E-mail
Written by Administrator   


Open your project in Visual Studio

From the top menu click Add New Item...



Add a Web Form. We recommend using a master page to keep consistency with the application.



We have created an error page called Oops.aspx, continue adding content to the page. Below is an example of a completed error page.



To enable the custom error page, add the following content to the Web.Config file.


<customErrors mode="RemoteOnly" defaultRedirect="~/Oops.aspx" />



The application will now re-direct user to the custom error page called Oops.aspx on ASP.NET errors. For more detailed info click here.