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