Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 gridview 绑定上收到以下错误。 DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Sr'.
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Sr'
在我的 gridview itemtemplete 中,我有一个这样的标签。
<asp:Label ID="lblQuesNo" runat="server" Text='<%#Eval("Sr.No.") %>'></asp:Label>
编号 存在于数据集中。
试试这个
<asp:Label ID="lblQuesNo" runat="server" Text='<%# DataBinder.GetPropertyValue(Container.DataItem, "Sr.No.") %>'></asp:Label>