Categories
7.0 7.5 7.8 8.0 C#.NET Microsoft SDK 7.1 SDK 7.8 Visual Studio Windows Phone

The name ‘DisplayModes’ does not exist in the current context

The name ‘DisplayModes’ does not exist in the current context

The error above is caused from the following code:

[sourcecode lang=”csharp”]
@{
Layout = "~/Views/Shared/_Layout.cshtml";
DisplayModes.RequireConsistentDisplayMode = true;
}
[/sourcecode]

Solution:

Replace
[sourcecode lang=”csharp”]DisplayModes.RequireConsistentDisplayMode = true;[/sourcecode]
with
[sourcecode lang=”csharp”]DisplayModeProvider.Instance.RequireConsistentDisplayMode = true;[/sourcecode]

Did my solution solve your problem? Leave a reply.

Categories
Chrome Google Internet Explorer Microsoft Mozilla Firefox Tips & Tricks W3C

Tips & Tricks – create sitemap automatically

To create automatically an updated site map (or sitemap) of your website I suggest you to use the

Sitemaps Generator

XML Sitemaps Generator | XML-Sitemas.com
Create your Google Sitemap Online – XML Sitemaps Generator

Services:

  • Free Online Generator (Maximum 500 pages)
  • Unlimited Generator (No limits)
  • Online PRO Service

To use the online Free Service, you need to enter some simple details:

  1. the full http address for your site
  2. change frequency
  3. last modification (if you don’t know use “Use server’s response”)
  4. priority (if you don’t know use “Automatically Calculated Priority”)

Then Start. Maximum 500 pages will be indexed in sitemap.

With the Free service, after process, you can download the following formats:

  • un-compressed XML (.xml)
  • compressed XML (.xml.gz)
  • HTML (.html)
  • in Text Format (urllist.txt)
  • ROR (ror.xml)

With the Payment Services you can generate any kind of Sitemap you require:

  • XML
  • HTML
  • Images
  • Video
  • News
  • Text formatted
  • Mobile

Do you think that my Tip & Trick is useful? Leave a reply.