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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
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
Jason C. LevineDon't talk to me.Commented:
Ah, ok.

Which language is this?  PHP or ASP?
0
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

CamnocAuthor Commented:
ASP VBSCRIPT
0
Jason C. LevineDon't talk to me.Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CamnocAuthor Commented:
Thanks
Probably not worth going to the trouble
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.