Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Redirect on error

Posted on 2008-11-11
6
Medium Priority
?
179 Views
Last Modified: 2012-05-05
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.?
0
Comment
Question by:Camnoc
  • 3
  • 3
6 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22933202
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
 

Author Comment

by:Camnoc
ID: 22938339
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
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22942412
Ah, ok.

Which language is this?  PHP or ASP?
0
Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

 

Author Comment

by:Camnoc
ID: 22942438
ASP VBSCRIPT
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 1500 total points
ID: 22957421
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
 

Author Closing Comment

by:Camnoc
ID: 31515486
Thanks
Probably not worth going to the trouble
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question