Posts

Showing posts from December, 2008

Data binding to strongly typed objects

A common source of error in ASP.NET development is mistyped data binding expressions. The reason for this, is that the expressions are not verified during compile time (together with the rest of our code), but first in runtime, when they are vastly more expensive to fix, time-wise. Just to bring everyone up to speed, I am talking about these: <asp:Repeater runat="server" id="attachments"> <HeaderTemplate> <table> </HeaderTemplate> <ItemTemplate> <tr> <td width="220" > <%#Eval("FileName")%> ( <%#Eval("MimeType")%> )</td> <td><asp:LinkButton runat="server" CommandName="delete" .../></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeatera> Now, if I were to misspell either of the public property names of my data bound object (an ins