I have a custom user control UserProfileLink
on which I have two basic string properties, UID
and UserFullName
which I would like to use in a template column in a DataGrid like this:
....
<ItemTemplate>
<td:UserProfileLink ID="uplUser" runat="server" UID="<%#Eval("UserUID") %>" UserFullName="<%#Eval("UserFullName") %>" />
</ItemTemplate>
....
I get an error saying开发者_运维技巧 "The server tag is not well formed" which leads me to believe this type of binding isn't possible. Is there a way to do this, or is it impossible?
Try ' instead of " for the server tag
<td:UserProfileLink ID="uplUser" runat="server" UID='<%#Eval("UserUID") %>' UserFullName='<%#Eval("UserFullName") %>' />
精彩评论