'ASP.NET "Server Error in '/' Application"

I'm trying to debug this issue but I'm not really sure what was the issue.

When I log in as an admin, I am unable to do this function - change password. It kept prompting this error~

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1061: 'Admin' does not contain a definition for 'ConfirmPass' and no accessible extension method 'ConfirmPass' accepting a first argument of type 'Admin' could be found (are you missing a using directive or an assembly reference?)

Line 51: Confirm password
Line 52:
Line 53: @Html.EditorFor(model => model.ConfirmPass, new { htmlAttributes = new { @class = "form-control", @placeholder = "Enter Confirm password", @type = "password" } })
Line 54: @Html.ValidationMessageFor(model => model.ConfirmPass, "", new { @class = "text-danger" })



Solution 1:[1]

Well, it looks like your user 'Admin' data model doesn't have a ConfirmPass field. Maybe it's a different data model for Admin role. Check this out !

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dobre.b