Forums

This topic is locked

How do I Redirect to a friendly error page

Posted 24 Jan 2003 02:40:25
1
has voted
24 Jan 2003 02:40:25 iota unum posted:
User types in a customer ID. If the ID is in the Access Database it goes to an info page which gives the user the information. If the ID is not in the database it brings up the standard ie error message. I would like a more professional error page. I tried inserting this code in the info page but it doesnt work.

If Request.Form("optID" <> (rsACE.Fields.Item("ID".Value) THEN
Response.Redirect("admin/wrongID.asp"
End If

What am I doing wrong. I am using DMX and Access XP

Edited by - iotaunum on 24 Jan 2003 02:43:13

Replies

Replied 24 Jan 2003 05:10:29
24 Jan 2003 05:10:29 asp asp replied:
In IIS server you can Create your OWN custom error page!!! build it in DMX and tell iis to go the the new page for error messages!
Replied 24 Jan 2003 10:03:17
24 Jan 2003 10:03:17 Julio Taylor replied:
error pages affect only server error codes such as 404 and 500. an id not found on a database idoes not constitute a server error but rather an application error and must be dealt with separately.

i don't know shit about ASP but i don't think IIS will sort the problem. you'll need to code a trap such as (in plain syntax)

$varname = (URL id)
$racordset = (recordset name)

if $varname <> $recordset then {redirect}
else
{ normal ASP page code }

that general idea should work, except i really can't tel you anything in relation to ASP since i am an ASP retard.



------------------------
Julio

PHP | MySQL | UD4

ICQ: 19735247

Reply to this topic