Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Im getting an error on this simple razor script?
@using umbraco.MacroEngines@inherits umbraco.MacroEngines.DynamicNodeContext
@{ if (Model.HasValue("address1") { <address> @Model.address1 </address> }
}
If i remove the if sentence, it works - However, when making a check on it, it makes the error
Hi. Hmm. Is not there simply ")" missed in the end of the "if"?
You can write this easier as well, you don't need the inherits and usings and don't need to put everything in a codeblock:
@if(Model.HasValue("address1") { <address>@Model.address1</address>}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Cannot invoke non-delegate type?
Im getting an error on this simple razor script?
@using umbraco.MacroEngines
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
if (Model.HasValue("address1") {
<address>
@Model.address1
</address>
}
}
If i remove the if sentence, it works - However, when making a check on it, it makes the error
Hi. Hmm. Is not there simply ")" missed in the end of the "if"?
You can write this easier as well, you don't need the inherits and usings and don't need to put everything in a codeblock:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.