Call Us On +44 (0)7939092349

What we do...

Kbuilt is a Glasgow based company providing bespoke online business applications. Key to our systems is a clear and clean interface. We produce applications that are intuitive to use allowing your staff to get on with working with your customers, instead of fighting the software. We will host, maintain and secure your application. So all you need to do is use it.

Umbraco Visual Studio Build Controller Error

Posted on 07-May-2013

Having built my Visual Studio Project from the examples

http://www.systenics.com/blog/setting-up-umbraco-6-in-visual-studio-2012-for-mvc-development/

and

http://www.ben-morris.com/using-umbraco-6-to-create-an-asp-net-mvc-4-web-applicatio

Added my own HomeController and ran the project I got the following error.

Error The type or namespace name 'RenderModel' could not be found

Need to add Using Umbraco.Web.Models;  directive to the controller.

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

using Umbraco.Web.Models;

 

namespace UMB_MVC1.Controllers

{

    public class HomeController : Umbraco.Web.Mvc.RenderMvcController

    {

        public override ActionResult Index(RenderModel model)

        {

            //Do some stuff here, then return the base method

            return base.Index(model);

        }

    }

}