Add in web config use statuscode for redirect to another page when error/exception
occur on page.
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404"/>
<remove statusCode="500"/>
<error statusCode="404" responseMode="ExecuteURL"
path="/Pages/Public/Error404.aspx"/>
<error statusCode="500" responseMode="ExecuteURL"
path="/Pages/Public/Error500.aspx"/>
</httpErrors>
</system.webServer>
NOTE : And Other method i think u know like try catch method...
No comments:
Post a Comment