I have a custom webpart and in the markup (.ascx) I have the following databinding expression
<%# CurrentUser.UserID %>
However, this doesn't render any value (despite the webpart inheriting CMSAbstractWebPart > AbstractUserControl) with the property CurrentUser.
If I use a macro
{% CurrentUser.UserID %}in one of the properties of the webpart, I get the value rendered fine (but that would be from the macro helpers so I can mimic that through a script as well, eg:
<div runat="server">
<%= CurrentUser.UserID %>
</div>
To get the same value.
I would really prefer a databinding expression though: why would this not resolve?
(And without having to set values in the code behind)
Thanks