Reputation: 47995
This is my code:
<myOwnCtrls:SocialLabel ID="SocialLabel1" CustomName="<%=CurrentPage.Titolo %>" runat="server" />
but on SocialLabel1
, if I write the content of CustomName
, it prints <%=CurrentPage.Titolo %>
, not the content of CurrentPage.Titolo
.
Why? And how can I do it without passing between the code behind?
Upvotes: 0
Views: 48
Reputation: 6733
You can do that in plain html controls but not in user controls. You have to assign CustomName in code behind:
SocialLabel1.CustomName = CurrentPage.Titolo;
Upvotes: 2