日期:2014-05-17  浏览次数:20560 次

为GV配置了LINQDataSource结果报错,
Could not determine a MetaTable. A MetaTable could not be determined for the data source 'LinqDataSource1' and one could not be inferred from the request URL. Make sure that the table is mapped to the data source, or that the data source is configured with a valid context type and table name, or that the request is part of a registered DynamicDataRoute. 

什么意思?
中文翻译我懂,但是,MetaTable什么呢?
------解决方案--------------------
建议不要有现成的LINQDataSource来绑定GV
自己写方法从DB取数据然后BIND到GV上:
gv.DataSource=db.Users.Where(x=>x.Name.Contains("Tim")).ToList();
gv.DataBind();