Nested Repeaters

Scott just posted a great article - Nested Repeaters Part 1. Great code samples and explanations of a topic that can be a bit confusing. I like the databinding syntax he's using, too:

You might have noticed that I use a databinding syntax which is a bit different to that used in most documentation, the DataBinder.Eval syntax - e.g., <%# DataBinder.Eval(Container.DataItem, "Price", "{0:c}") %> , instead I tend to use this syntax <%# string.Format("{0:c}",((DataRowView)Container.DataItem)["Price"])%> - I've covered my reasons for this in the past and well, I just prefer it...

The DataBinder.Eval syntax has always kind of bugged me, too, and Scott's previous post about this is pretty persuasive.

No Comments