November Happy Hour will be moved to Thursday December 5th.

DynamicContentPlugIn

Vote:
 

Hello,

 

I try to create a DynamicContentPlugIn but I would like to do that in MVC. Here is where I have currently implemented:

[DynamicContentPlugIn(Url = "/DynamicContent/MyTestController/Index", DisplayName = "MyTest")]
public class MyTest : IDynamicContentBase
{
   public string Bla { get; set; }

   public string State
   {
     get { return string.Empty; }
     set { }
   }

   private PropertyDataCollection _myProperties;
   public PropertyDataCollection Properties { get { return _myProperties; } }

   public MyTest()
   {
     _myProperties = new PropertyDataCollection();
   }
}

I have create an Area "DynamicContent" into my project and register this area like this: 

public class DynamicContentAreaRegistration : AreaRegistration
{
   public override string AreaName
   {
     get
     {
        return "DynamicContent";
     }
   }

   public override void RegisterArea(AreaRegistrationContext context)
   {
     context.MapRoute("DynamicContent_default",
           "DynamicContent/{controller}/{action}/{id}",
            new { action = "Index", id = UrlParameter.Optional }
            );
    }
}

And finally create my controller:

public class MyTestController : Controller
{
  public ActionResult Index()
  {
     return View();
   }
}

But I always have this error message: The user control "/DynamicContent/MyTestController/Index" could not be loaded.

How can I fix it?

 

Regards,

 

Benjamin V.

 

 

 

#70892
May 03, 2013 9:22
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.