• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

How to handle error in multiview

I have a multiview with 5 views. User enters name, phone number, address, etc.
I call 5 stored procs to save each section.
I have the "save" method wrapped in a try-catch and I roll back using Transaction in code.

Now, if an erorr occurs in any of the steps, i catch it and display a generic msg that an error has occured but user doesnt know what step has raised the error...i only display a generic msg to the user.

How can I tell the user which step has an invalid data? for example, i have text area that should only hold 1000 chars. I thought i had fixed this but user still got an error...

I have requiredfieldvalidators and user can't go to next step if the corresponding field is not met the right criteria but how else can I tell the user which step has caused the error?
0
Camillia
Asked:
Camillia
  • 2
  • 2
1 Solution
 
Dale BurrellDirectorCommented:
If you fully validate every field, and don't allow the user to move to the next step until the data is validated then problem solved.
0
 
CamilliaAuthor Commented:
even validate the length of each field? for example, name is 250 characters. What if the user enters 300 chars? how do I validate that?
0
 
Dale BurrellDirectorCommented:
0
 
CamilliaAuthor Commented:
you know what, I didnt know i can use regular expressions to check for field length. I knew it actually but not as data valididation as far as the length of the fields go. Thanks.
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.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now