Redirect on error

Hi
Is there some way in the event of an eror i.e  time entered in wrong formatm, instead of going to the SQL Error page (The page cannot be displayed) that on submission of a form onError response.redirect to a url to alert the user data was not entered.?
CamnocAsked:
Who is Participating?
 
Jason C. LevineConnect With a Mentor No oneCommented:
Okay, I'm no good with ASP, but what you need to do is figure out what the ASP equivalent of the PHP die() function is and add it to the code.

die() is used in PHP with an or condition and it traps the error and allows you customize the display.
0
 
Jason C. LevineNo oneCommented:
Hi Camnoc,

You would need to perform the validation on the client side (javascript) or write additional server side validation that checks the format of each variable before executing the Insert or Update behaviors
0
 
CamnocAuthor Commented:
Hi Jason
I agree validation is the secret to preventing errors, however there are times when errors occur  causing the dreaded (The page cannot be displayed) to appear due to freak occurances for which validation may not be in place. I just thought there may be some way of preventing this happen by redirecting to a url in the event of an error, probably cant be done?
Camnoc
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
Jason C. LevineNo oneCommented:
Ah, ok.

Which language is this?  PHP or ASP?
0
 
CamnocAuthor Commented:
ASP VBSCRIPT
0
 
CamnocAuthor Commented:
Thanks
Probably not worth going to the trouble
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.