Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShaun Kelly
35,560 PointsI need to combine these two lines of code....
I need to combine these 2 lines of code as i am getting a runtime error:
The 'inherits' keyword is not allowed when a 'model' keyword is used
@model IEnumerable<Dignity.Core.UmbracoModel.Banner>
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
1 Answer
Steven Parker
231,271 PointsThese statements do the same thing, but "model" is the more modern syntax. You should only have one, and it should conform to the model that is passed to the view.
Why would you think you should "combine" these?