このリピーターのマークアップを短くする方法はありますか? このリピーターに DataTable をバインドしています。((System.Data.DataRowView)Container.DataItem) は反復的であり、特にフィールドが多い場合にマークアップが読みにくくなるため、気になります。.Net 3.5 C# WebForms を使用しています。MVC はオプションではありません。ありがとう。
<asp:Repeater ID="rDefinitions" runat="server">
<ItemTemplate>
<h3><%#((System.Data.DataRowView)Container.DataItem)["Name"]%></h3>
<p>Definition:
<%#((System.Data.DataRowView)Container.DataItem)["Definition"]%>
</p>
</ItemTemplate>
</asp:Repeater>