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
I want to use an inline Razor Macro in a Master page to control the visibilty of a web control in the Master page template as follows:
phHeaderPanel.Visible = @Model.showHeaderPanel == 1
...but this does not appear to be possible as I get a get an error stating:
"The name 'phHeaderPanel' does not exist in the current context"
Is this even possible?
Razor does not live in the asp.net control lifecycle. It might be possible, but not without using a few tricks.
OK thanks. Might find an alternative approach to what I am trying to do then.
jQuery: hide() ? ;)
Also have a look at this topic, it seems very similar: http://our.umbraco.org/forum/developers/razor/21722-Set-Razor-macro-parameters-in-code-behind
Thanks, I've gone for uComponents uQuery to get the property from the current page and control the visibility of the web control.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Control Master Page Control Visibility with In-line Razor Macro
I want to use an inline Razor Macro in a Master page to control the visibilty of a web control in the Master page template as follows:
...but this does not appear to be possible as I get a get an error stating:
"The name 'phHeaderPanel' does not exist in the current context"
Is this even possible?
Razor does not live in the asp.net control lifecycle. It might be possible, but not without using a few tricks.
OK thanks. Might find an alternative approach to what I am trying to do then.
jQuery: hide() ? ;)
Also have a look at this topic, it seems very similar: http://our.umbraco.org/forum/developers/razor/21722-Set-Razor-macro-parameters-in-code-behind
Thanks, I've gone for uComponents uQuery to get the property from the current page and control the visibility of the web control.
is working on a reply...