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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...