From 0714b1c3091114d3089ea094e68d57d6a553066b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 8 May 2021 18:38:36 +0300 Subject: Added register view message when register was unsuccessful --- ExamTemplate/Web/Controllers/AccountController.cs | 2 +- ExamTemplate/Web/Views/Account/Register.cshtml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'ExamTemplate/Web') 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 @@ + + @if (Model != null) + { +

+ Couldn't register account! +

+ } -- cgit v1.2.3