Domanda

Building an Umbraco 6.1.5 MVC site in the .net 4.5 framework using VS2012. When trying to use a couple of common packages, specifically Cultiv Contact Form and the Google Maps datatype I get a green squiggly underline under the word "umbraco" in the following instance:-

<umbraco:Macro FileLocation="~/macroScripts/CultivContactForm.cshtml" MailFrom="website@abc.com.com" runat="server" />

The error shown if I mouse over "umbraco" is "unrecognized namespace 'umbraco'".

The top of the file has:-

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using umbraco;

I cannot understand why the "@using umbraco" doesn't fix the problem.

Any advice appreciated.

È stato utile?

Soluzione

Because - and it looks like that - ah - sorry to say but razor pages have a different syntax than old asp.net user controls.

It looks to me like you think you can magically use a user control in a razor page. Bad news - no.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top