I am pretty new to ASP, so I am unsure how to handle the following scenario
1) User fills out a form
2) ASP validates the form
3) ASP calls WCF Soap Client to insert record into database
4) Soap Client throws a FaultException
5) ASP page catches exception
6) Desire to replace form with custom error message and phone number
How do I do 6?
I don't really want to redirect to another page, and I surely don't want a static error message. I want to include some details from the exception in a more readable format.
Here is my failing code:
EmailAddress emailAddress = new EmailAddress();
emailAddress.Address = txtEmailAddress.Text;
emailAddress.IsPrimary = true;
prospect.EmailAddresses.Add(emailAddress);
// Submit the form data to the database
PersonalDataSOAPClient client = new ...
Go to the complete details ...