I’m creating a control and need to pass it the current logon user as a parameter (declaratively)
I tried this but didn’t work (I got ‘<%= User.Identity.Name %>’ as value):
<cc1:MyControl id='myid' runat='server' User='<%= User.Identity.Name %>' />
Is there a way to do it?
Related Questions
No related questions found
Why do you need to pass it at all?. The user control can access the User.Identity.Name property directly.