当运行包含以下代码的 asp.net 页面时,我得到“DataBinding:'System.Data.DataRowView' 不包含名为 'PKComplexID' 的属性”错误
<asp:TemplateField HeaderText="Complex">
<EditItemTemplate>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:RefahiConnectionString1 %>"
SelectCommand="SELECT [PKComplexID], [ComplexName] FROM RFH_Complex">
</asp:SqlDataSource>
<asp:DropDownList ID="DDLComplex" runat="server" DataTextField="ComplexName" DataValueField="PKComplexID"
SelectedValue='<%# Bind("PKComplexID") %>' DataSourceID="SqlDataSource2">
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label" runat="server" Text='<%# Bind("ComplexName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
它出什么问题了?