SmartestVEGA
SmartestVEGA

Reputation: 8889

Type or namespace name does not exist

I am using the code below :

using CMS.DataEngine;
using CMS.DocumentEngine;

namespace Fort.CMS.CMSPages
{
    public partial class CreatePage : System.Web.UI.Page
    {
        #region "Variables"

        private CMS.DocumentEngine.TreeNode mNode;
        private TreeProvider mTree;

Getting error at the line: private CMS.DocumentEngine.TreeNode mNode;

Error :

Type or namespace name "DocumentEngine" does not exist in the namespace "Fort.CMS"

Here DocumentEngine is not recognized.

But it works if we remove the namespace.

namespace Fort.CMS.CMSPages
{}

Upvotes: 2

Views: 523

Answers (1)

Mukesh Methaniya
Mukesh Methaniya

Reputation: 772

I think there is namespace conflict.use as below

using CMS.DataEngine;
using DE=CMS.DocumentEngine;

namespace Fort.CMS.CMSPages
{
    public partial class CreatePage : System.Web.UI.Page
    {
        #region "Variables"

        private DE.TreeNode mNode;
        private TreeProvider mTree;

Upvotes: 2

Related Questions