DataList 中套 GridView
我在 DataList 中加了个 GridView 控件 在编译时提示我 ”当前文中不存在“
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
<table width="1000" align="center" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td>
<asp:GridView ID="Gridoneself" runat="server" Width="100%" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<Columns>
<asp:BoundField HeaderText="考核项目名称" DataField="EvaluationItem">
<ItemStyle Width="300px" />
</asp:BoundField>
<asp:BoundField HeaderText="考核时间" DataField="EvaluationDate">
<ItemStyle Width="60px" />
</asp:BoundField>
<asp:BoundField HeaderText="得分" DataField="Score">
<ItemStyle Width="50px" />
</asp:BoundField>
<asp:BoundField HeaderText="考核人" DataField="EvaluationRen">
<ItemStyle Width="100px" />
</asp:BoundField>
<asp:BoundField HeaderText="备注" DataField="Remarks" />
</Columns>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="Gainsboro" />
</asp:GridView>
</td></tr>
</table>
</ItemTemplate>
</asp:DataList>
在编译时提示我 ”当前文中不存在名称 “Gridoneself“