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'd like to use the current user's 'asp login name' in a .net macro placed in a template. I'm thinking of something like:
<umbraco:Macro Alias="macroAlias" runat="server" userName="<% =someFunction() %>"></umbraco:Macro>
or
<umbraco:Macro Alias="macroAlias" runat="server" userName="<asp:LoginName />"></umbraco:Macro>
but I have been unable to find the correct syntax to do this. Any ideas?
Hi. I would try this:
<umbraco:Macro ID="myMacro" Alias="macroAlias" runat="server" /><script runat="server"> void Page_Load() { myMacro.MacroAttributes.Add("userName", Page.User.Identity.Name); }</script>
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
asp login name into macro
I'd like to use the current user's 'asp login name' in a .net macro placed in a template. I'm thinking of something like:
<umbraco:Macro Alias="macroAlias" runat="server" userName="<% =someFunction() %>"></umbraco:Macro>
or
<umbraco:Macro Alias="macroAlias" runat="server" userName="<asp:LoginName />"></umbraco:Macro>
but I have been unable to find the correct syntax to do this. Any ideas?
Hi. I would try this:
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.