I have the following asp.net code
asp:MultiView runat="server" ID="mvPaymentsOnProperty" ActiveViewIndex="0">
<asp:View runat="server" ID="vPaymentsMadeOnProperty">
<br />
<asp:GridView runat="server" ID="gvPaymentsMadeOnProperty" AutoGenerateColumns="false" EmptyDataText="bla bla">
<Columns>
<asp:BoundField HeaderText="bla" DataField="bla" />
<asp:BoundField HeaderText="foo" DataField="bar" />
</Columns>
</asp:GridView>
</asp:View>
<asp:View runat="server" ID="vNoPaymentsMadeOnProperty">
Some sort of error
</asp:View>
</asp:MultiView>
当我尝试加载页面时,出现以下错误:
MultiView不能拥有“GridView”类型的子级。它只能拥有“View”类型的子级。
我已经折叠了Multiview代码,它唯一拥有的两个子级是视图。它是因为视图的内容而在抱怨吗?否则,这几乎是无用的。
我该如何解决这个问题?