ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Pop form not posting data again after server return 500 status code.
Title:
B
I
{code}
?
Hi In one of my registration popup for I am checking uniqueness of username on server and if already exist returning 500 internal server error message, this I am doing on post of data. Now after this error the form is not getting post even when I changed the username. what will be the problem.
Save Changes
Cancel
SJS
asked at 18 Apr 2014
error 500 means server (unhandled exception), you should wrap in a try catch in your post action code; when the username is not unique you should add a validation error to the model, no need to throw exception (ModelState.AddModelError("UserName", "user not valid");
at 18 Apr 2014
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK