diff options
| -rw-r--r-- | ExamTemplate/Web/Controllers/AccountController.cs | 2 | ||||
| -rw-r--r-- | ExamTemplate/Web/Views/Account/Register.cshtml | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ExamTemplate/Web/Controllers/AccountController.cs b/ExamTemplate/Web/Controllers/AccountController.cs index 4e52c86..d56d3df 100644 --- a/ExamTemplate/Web/Controllers/AccountController.cs +++ b/ExamTemplate/Web/Controllers/AccountController.cs @@ -44,7 +44,7 @@ namespace ExamTemplate.Web.Controllers Password = registerUserServiceModel.Password }); else - return View(); + return View(registerUserViewModel); } [HttpGet] diff --git a/ExamTemplate/Web/Views/Account/Register.cshtml b/ExamTemplate/Web/Views/Account/Register.cshtml index 7eaca19..9514ed3 100644 --- a/ExamTemplate/Web/Views/Account/Register.cshtml +++ b/ExamTemplate/Web/Views/Account/Register.cshtml @@ -17,4 +17,11 @@ <span asp-validation-for="Password" class="form-error"></span> <input type="submit"> + + @if (Model != null) + { + <p class="form-error"> + Couldn't register account! + </p> + } </form> |
