>What happened when I tried it yesterday, the exception handling in Application_Error catches the error when user enters wrong URL. Therefore, the page 404b.htm never gets displayed. And I don't know how to make Application_Error ignore some errors.
>
You are right. Processing goes through Application_Error.
You can redirect certain error codes in web.config
<customErrors defaultRedirect="~/RecordSearchForm.aspx" mode="On">
<error statusCode="404" redirect="~/RecordSearchForm.aspx" />
</customErrors>