Declarative data binding on User Controls
I had this problem a few years ago and figured that there was no good solution, but I am older and wiser now so figured it’s time look for a better solution. I have a GridView, and inside the ItemTemplate I call one of my own UserControls: <asp:GridViewID="grdMessages"runat="server" ... > ... <ItemTemplate><uc1:EmailAddressID="EmailAddress1"runat="server" DataSource='<%# (MailAddress)Eval("FromAddress") %>'/>ItemTemplate> ... asp:GridView> But the DataSource property of the EmailAddress user
Read post »