My Errors & My Solutions My Errors & My Solutions - It Could Happen To You
The name ‘DisplayModes’ does not exist in the current context
The error above is caused from the following code:
@{
Layout = "~/Views/Shared/_Layout.cshtml";
DisplayModes.RequireConsistentDisplayMode = true;
}
Solution:
Replace
DisplayModes.RequireConsistentDisplayMode = true;
with
DisplayModeProvider.Instance.RequireConsistentDisplayMode = true;
Did my solution solve your problem? Leave a reply.
The name ‘DisplayModes’ does not exist in the current context Eclipses