一个很奇怪的问题!有代码!在线等
我在html上面绑定一列到datagrid,代码如下:
<asp:TemplateColumn HeaderText="关联主题">
<ItemTemplate>
<asp:DropDownList Runat="server" DataSource='<%# GetSubjects(
(DataRowView)Container.DataItem ) %>'>
</asp:DropDownList>
</ItemTemplate>
</TemplateColum>
我在C#下面写了一个函数:
protected ArrayList GetSubjects(DataRowView drv)
{
ArrayList a = new ArrayList();
......
return a;
}
现在编译没有问题,但是当我运行的时候它提示出错信息:
The type or namespace name 'DataRowView' could not be found (are you missing a using directive or an assembly reference?)
请问是怎么回事啊?